Idk if anyone will use this, but if you need named hostile mobs to not disappear in peaceful mode, that's what this does.
Hostile mobs will behave as they do in creative mode when they don't despawn in peaceful mode.
Not due to this mod, just natively. The mod just stops them from despawning in peaceful if they've been named.
version 1.17.x-0.0.2 no longer requires fabric api;
some unnecessary code has been removed;
Also works with 1.17;