In water, flowing water, and certain waterlogged blocks, your spawn point won't be obstructed. This doesn't happen with any other dangerous blocks.
Linked issues
relates to 2
Attachments
Comments 8
This relates to MC-273848, as valid spawn points underwater could end up being the world spawn.
This report should be set to community consensus because I was able to reproduce it as part of MC-189579.