My shitzu is nearly 2. In the early days she chose a back corner of the kitchen as a toilet. It’s not next to the door so she’s not trying to go out. I think she picked it because it’s out of sight and she could go without being caught. She was smart enough to realise she got in trouble for going indoors, so she picked a quiet spot where she could get away with it.
Anyway she still keeps going there occasionally. She’ll just wander into the kitchen and doesn’t bark at the door to go out, then she comes back looking guilty and I know she’s gone in the corner.
I tell her off and she knows she’s not supposed to go there, but she keeps doing it a couple of times a week. Usually #1 but occasionally #2 if we haven’t been for a walk yet. DH is furious and threatening to get rid of her if I don’t fix it - and I can’t make her stop.
She was doing the same thing in the spare bedroom too. Doing a secret #2 in a room where it wouldn’t get noticed so she wouldn’t get in trouble. I’ve had to wedge the door closed so she can’t push it open. But I can’t block off part of the kitchen.