Similar issue with one toilet in my house, always had about a 1" gap behind it for a long time. A couple years ago, while fixing some other things up in that bathroom (including a new toilet), I got some cheap tile and did the wall behind the toilet about 3' feet up from the floor. Perfect 1/4-1/3" gap now.