You're correct, however that seems like a bit of a poorly designed junction, what happens if you're coming from across the level crossing wanting to turn into the main road and there's a constant stream of traffic? It doesn't look like there's enough space for even a single car to wait past the barrier
From street view the best plan seems to be sit on the railway line and wait
Personally, I'd wait behind the solid white line until the car across the rails goes, granted you're still under the barrier, but at worst if the lights start and the barrier starts, you can at least slowly, carefully try to move out from under the barriers without actually being on the rails.

Hopefully that’s his lesson learnt and he won’t do such a stupid thing again.