Steps to reproduce :
Go into survival mode, set a worldborder, get away from it's center, build a nether portal. You get killed when you spawn into the nether.
I think it might be that the worldborder also affects the nether, but as it has different coordinates from the overworld, you can get outside the nether border.
What would be expected is that the nether worldborder should match with the overworld one.
Duplicate – If you have not, please use the search function in the future, to see if your bug has already been submitted.