Your kitty might just be confused and is looking for the nearest litter box like thing to do their business in.
My kitty right now has an upset tummy, and runny poo, so he isn't making it all the way to the laundry room before he poops. He will often run into the shower, scratch and poop, or will go on a rug, or a basin...etc..etc.
Cats usually scratch the ground before they pee, so I have a suggestion, if you are as close to your cats as I am...when you hear them scratch, just grab the cat, and RUN. Run to the litter box, and put the cat in it. This worked for me.
Another suggestion might be to buy a 2nd litterbox temporarily, put one in the old position, and one in the new, then slowly move the old one to the new.
Some cats don't like sharing a litter box, so having 2 might help you long term.