To recreate, dig a hole in the ground and place a stained glass pane, make sure the pane is connected to all 4 sides. When the pane in the previously mentioned condition is waterlogged, some connections to the blocks will be above the water, some under the water.
Environment
Java Version 8 Update 211 under Windows 10 Pro 1903 x64
This appears to be a duplicate of MC-9553.