I am not sure if this will help. However, check to see of the recent medication has hormones in it. If that is the case, although it is working for your cat, it might be causing bladder control problems. If that is the case maybe your cat is missing the box because she can't make it into the box without her bladder letting go along the way. My dog had this problem and was put on a med. called Incurin. It solved the leaking problem. Perhaps not the case for you but I thought I would share the info. Best of luck.
x2 Also, perhaps confining her to a smaller area, a small room perhaps a laundry room or bathroom or even a Tokeyo cage with more than one litter box to give the cat a chance to adjust to the medication and being able to reach the litter box in time.
You have already received some suggestions that can help.
Sounds like she has heart failure which is a serious problem. She may not be able to make it to the box with the diuretic effects.
But I offer these additional suggestions:
1-Make sure the box is easy for her to enter, that it is large enough for her to be able to turn around inside the box. Place it closely to where she spends her time.
2-Consider multiple location boxes if she "hangs out" in different rooms.
3-Evaluate the type of litter you use - and whether you have made a change in they type of litter lately. Select one without a fragrance.
4 - use a water impermeable matt under and around the box.
Hope you get the problem worked out.