With my oldest cat, if she managed to use the litter box at all, she'd always lift her butt up while peeing. Always. Like she was spraying. I retrained her a little bit by falling her to the litter box and holding her butt down when she peed.

But that was if or when she used the box. Vast majority of the time she didn't use it to poop or pee. She was like that her whole life though, just got worse as she got older. How old is your cat? This can be a problem with older cats. Not entirely sure how to fix it but it happens. Some say it's because they have arthritis and have problems climbing over the side of the box. Could be truth to that, I dunno. But I tried everything with mine. I just gave up fighting the battle and just cleaned up after her. I wasn't going to put her to sleep because of that. She eventually had to be sleep a little over a year later but for kidney failure. She was 15 1/2.