I am not sure if this is really a bug as Minecraft handles the worldborder kind of like solid blocks.
When you set the worldborder diameter to values that cause blocks to be only half covered, the player can still walk completely in that block
How to reproduce
/worldborder center ~ ~
/worldborder set 11
Try walking through the worldborder (it will not work)
/worldborder set 11.01
Even though it seems like the worldborder did not change at all, you can walk one block further
I'd recommend reopening this as 1.17 and 1.18 have made significant changes to the functionality of the world border such that this may benefit from revisiting.