When standing up from the cab seat on the 1972 stock, it would teleport me into the roof of the train and I would be stuck in the roof. This only occurs when I press the '1' key (which puts you into the cab camera). Hopefully this bug gets fixed ASAP knowing what DTG are like... best tips of advice is to not go into the exterior cameras as when you return to the cab camera you will be unable to leave the cab as you will get stuck.
Interesting! I too have this issue, and it is nice to know what causes it. It is a shame as I like looking outside.
Just had the same problem on PS5. I stood up at the end of the service to change ends and drive the return trip. I was then teleported to the roof of the train. I was at elephant and castle and was stuck between the roof of the train and the ceiling of the station. Only way out was quitting back to the menu.
If you have a keyboard - plug that in and press "Ctrl + =" or "Ctrl + -" to swap ends. Then you can stand up normally. Unfortunately, you then have to walk back to the front, but for now - it is a workaround.