Fences and Walls don't connect to itself when you disable vanilla datapack by using command "/datapack disable vanilla"
Might be related to how vanilla datapack add fences to the #minecraft:fences block tag.
Glass pane and Iron bar still working fine though.
MC-123029 issue is only partially overlapped this issue.
This issue focuses especially on how fence and wall don't connect to itself when disabling vanilla datapack but it's can still connect to other blocks.