I discovered that this problem occurs only if you've already loaded the world with music on and if you set it to ''off'' only when music is already playing.
Second screenshot: the fence was placed and sound was heard. First screenshot: the top fence was placed without sound to be heard. Third screenshot: all the fences except the bottom one was placed without sound to be heard.
I discovered that this problem occurs only if you've already loaded the world with music on and if you set it to ''off'' only when music is already playing.