This is not about a gameplay bug.
Generally accepted Valheim knowledge says:
1. "If the player leaves an area, mobs that are no longer within the player radius will despawn."
2. "Day-only or night-only spawns will despawn with night or day", respectively."
I'm here to argue that mobs sometimes disappear instead of despawn.
Why does it matter? It means that if you want to hunt a specific creature (not just a type of creature), the mechanics are in place to do so.
To "spawn" means a mob starts from scratch/nothing and must not only fulfill spawn conditions, but could also vary in level (or infusion, extra effect, etc).
To "despawn" means to be sent back to scratch/nothing, thus requiring spawning (as defined above) in order to be visible to the player.
To "disappear" means simply to not use system resources for rendering or AI, but the mob is not wiped to scratch/nothing. The mob level and location are saved along with (presumably) other data.
To "reappear" means to become visible and start using system resources again but without having to meet spawn conditions or the possibility of changing level/etc.
Here's basically what I think happens.
When a mob falls outside the player's render radius, they disappear rather than despawn. When that radius re-encompasses that mob, it reappears rather than respawns.
This happens regardless of whether it is day or night.
But something happens that we never see: a night-creature reappears during the day and almost instantly despawns because it is day. However, a night-creature reappears during the night and simply continues its behavior as before.
And here's my strongest example:
I spawned a night serpent and led it towards a swamp, and when it agro'd leeches I was able to get away. A number of in-game days later, I sailed past at night. A serpent was in the exact same position within the swamp and was also eating leeches.
My claim is that it was not just a serpent respawn but the exact same serpent reappearing. And the only explanation I can come up with for why a 5% spawn chance serpent would spawn in a swamp in the exact same location as before is that it never actually despawned.
I've had other experiences with this "phenomenon", but that's the strongest example.
And ultimately the question is: what are the actual despawn conditions for mobs?