Vanilla Minecraft should really have a difficulty called ‘Pacifist’ that sits between peaceful and easy. It should allow mobs to spawn, but prevent them from attacking the player unprovoked. This mod attempts to address this shortfall by forcing all aggressive mods to not be hostile towards players. The mobs will become hostile when attacked and seek their revenge, though they will often become pacifist again rather than fight to the death. Be aware that Piglins and Hoglins will still take exception to players not wearing an item of gold armor.
This mod is very lightweight, and as such currently offers no configuration options.
Note that as this mod requires hostile mobs to spawn, it becomes useless if the player selects peaceful difficulty.