Looks like this:
Basically, the way you build last, lasts here.
Which just doesn't look right at the end of a tunnel, as the portal isn't displayed that way.
This visual bug only happens in underground mode.
In tests in never showed a portal in the away facing end. I could not generate something like you showed.