minecraft:knockback_resistance for you with a switch.Get GodCraftOverview
minecraft:knockback_resistance is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Reduces how far the entity gets pushed back when hit. A value of 1 means it is never knocked back.
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:knockback_resistance": {}
}