This behavior was introduced in 26.1-snapshot-3.
The bug
When a warden is spawned from a spawn egg (by a player or dispenser), it always immediately burrows into the ground. This is not the case for wardens spawned naturally, by spawners, or using the summon command.
The Environment field is supposed to only contain PC details.