Horizontal docking: hulls and gaps placement

#1
I'm having trouble attaching shuttles to the submarine so that the connection doesn't leak. By themselves both the shuttle and the sub work fine, but after docking them when you open doors leading from one to another water appears out of nowhere and fills the vessel you've opened the door on.
Spoiler
Image
The place between vessels is always water-free though, as if there's a hull there that's not letting the water pass.
Spoiler
Image
I used three shuttles of same model to test this out. So how does proper horizontal docking work? Is this behaviour a bug or is it me doing something wrong?