On my realm I live on a mushroom island. I have noticed on occasion close to the ocean, mobs will spawn within the mushroom biome itself. This isn't the same as MC-93271, as I had already removed all of the land from the ocean biome itself (see screenshots where I screenshotted the mob right after it spawned and then the biome/coordinate information at that location).
Seed: 494 (World first generated in 1.17 singleplayer)
To recreate, you can either wait for the mobs to spawn or fly up and down to speed up the process like I did. Note: I was unable to recreate this in singleplayer, thought I don't think this is exclusively a Realms issue, but rather a multiplayer issue.
I'm not sure if this has anything to do with pack spawning or not.
Linked issues
Attachments
Comments 5

Does this occur in a vanilla instance of Minecraft? If not, this ticket is invalid.

This is likely a duplicate of MC-209558.
Assuming that a realm is a vanilla instance then yes. I can confirm this also occurred when I connected from a vanilla client, and there were no blocks inside the ocean biome on the surface, as those would allow mob spawning, which I don't want on my island
So, if there is any block inside of the Ocean biome that is on the surface, I believe this will still allow for the mob to spawn