I replaced the old TV in my 2007 Montana. I think in a location something like yours as my slide also comes in in front of the TV. But I have a little more than 2" clearance.
I made a box insert to go into the cabinet opening using an articulating mount for the TV. New TV is 32" vs the old 27". And the TV mounts outside the cabinet as it is larger than the opening. It is less than 2" thick, but may still be too much for yours. But you might come up with a way to install the articulating mount on an angled panel inside the cabinet and have the TV slip sideways into the cabinet when not viewing.

Cabinet insert I made. (got a little carried away)

If the articulating mount was on a angled back panel, it might let you slip a smaller TV inside the cabinet for travel.

