Factorio doesn't support the possibility of change the pipe connection overlay with the rotation.
This isn't a bug, is the way how is implemented the endpoints, maybe the only possible way to have that overlay on fluidbox connections. Anyway yes, is related to the rotation, is for fix the graphical connection with the duct and pipe, each endpoints have 4 possible pipe overlay and unfortunately Factorio don't have an option to group it in one entity.