Invite protection controls invites to other servers. Invites to this server (including its vanity URL) always pass while "Allow own server invites" is on; invites to the servers on the allowed list pass too. Every other invite is handled by the foreign invite action once the module is enabled. Invite links are recognised in message text, embeds, forwarded messages, polls and link buttons, including invites posted inside code blocks.
Example
/setup › Find a setting › Invite protection