If you have a chance watch this video Videos & Tutorials
This reminds me so much of what your cat is doing. My old kitty who made it to 23 was also doing this same thing - never really figured it out completely - I had to modify her litter box to make it lower in the front because she was having a hard time stepping up and in. She passed a week after her 23rd birthday. I wish I had other answers for you but see if this video mirrors what you're seeing at home.
This reminds me so much of what your cat is doing. My old kitty who made it to 23 was also doing this same thing - never really figured it out completely - I had to modify her litter box to make it lower in the front because she was having a hard time stepping up and in. She passed a week after her 23rd birthday. I wish I had other answers for you but see if this video mirrors what you're seeing at home.