Very few people rebuild master or wheel cylinders anymore, but we used to always go the rebuild route, unless the walls of the bore were too pitted to hone out. But if the fluid level is staying up, and the pedal drops, but you can build pressure by pumping it, then the fluid is bleeding past the piston inside the master cylinder. It can be as simple as a piece of dirt, or excessive wear on the bore, or degredation of the cup.
I am possibly making a lot of assumptions here, because I have not rebuilt a master cylinder since about 30 years ago, on a 72 Dodge Coronet I had back then. I have not had a master cylinder go bad since, and the honing stones on my hone have fallen off, so I doubt if I'd do it now anymore, except on an older car. On the 72, as I recall, the fluid level was going down fast, but there were no external leaks. It was leaking out of the master cylinder into the power assist chamber, and being sucked into the carb by the vacuum system.