Jump down from platform does nothing.

This has been covered a lot but I can’t figure out why my implementation is not working. I’m trying to implement being able to jump down through a platform when pressing down and jump. The platform effector is disabling so that’s good but the ignore collision on layer seems to have no effect whatsoever. The player object just sits on top of the platform as if nothing happened.

my player has this in an update script:

if (Input.GetKey(KeyCode.S) && Input.GetKey(KeyCode.Space))
{
      platformScript.platformEffector2D.enabled = false;
      Physics2D.IgnoreLayerCollision(7, 6);
      print("should be falling");
}
}

my platform with the platformeffector component and script is the following:

    public PlatformEffector2D platformEffector2D;
    void Start()
    {
        platformEffector2D = GetComponent<PlatformEffector2D>();
    }

To quote this thread about the topic:

"With your new screenshot in your question, Physics2D.IgnoreLayerCollision is not currently working because you are using PlatformEffector2D on your colliders.

It doesn’t work because PlatformEffector2D have it’s own collider mask settings which is enabled by default and overrides whatever you set to Physics2D.IgnoreLayerCollision. You can use PlatformEffector.colliderMask to select the layers or disable PlatformEffector2D’s mask so that you can use Physics2D.IgnoreLayerCollision. I suggest disabling PlatformEffector2D’s mask as that’s because it’s more easy to use Physics2D.IgnoreLayerCollision.

You can disable PlatformEffector2D’s mask by setting PlatformEffector2D.useColliderMask to false. This must be done for both the player and the platforms PlatformEffector2D component."

Inside the thread they also mention that you should not be setting the physics to ignore the collision layer every frame, only once when the key is pressed and released each.