Trouble with Layer Overrides

I’m working with projectiles. I want the projectile to be able to pass through certain objects. I tried using the Layer Override in the projectiles Collider2D component, but it doesn’t seem to be working
9935694--1438260--upload_2024-7-11_12-13-57.png
Maybe I’m not using this correctly, and I know that there is a Physics.IgnoreCollisions method, but I don’t want to add unnecessary code that runs every frame when there is a simpler way to do it.