Collision Detection when already touching OR entering Collision

In my game I need to detect the collision of the ball touching the walls when a certain game state (“Action Time”) is active. So when the game is started and the ball touches the walls, nothing should happen. But when the Action Time is active, the Ball changes its position whenever it touches the walls.
I could implement this but the issue is the following: when the ball is already touching the wall and then the game states changes to “Action Time” the detection is not registered as I am using OnCollisionEnter.
This is my code attached to the ball:

private void OnCollisionEnter2D(Collision2D collision)
        if (collision.gameObject.tag == "wall")
            if (ActionTimeActive)

A similiar question was asked here, where the solution is OnCollisionStay, but I cannot use OnCollisionStay since the Ball in my game doesn’t bounce back. So entering and leaving the touch are at two different times.

There are two scenarios:

  • “ActionTime” is active and then Ball touches the wall → this works perfectly
  • Ball touches the wall and doesn’t let go as if it is glued and THEN “ActionTime” becomes active → no collision detection. Position needs to be changed as soon as the touch begins.

What can I do?

Try experimenting with collision types on the rigidbody component, like changing it from discrete to continuous, Unity - Scripting API: Rigidbody.collisionDetectionMode

That doesn’t work. For the ball I can only select either “discrete” or “continuous” for the collision detection. For the wall there is no choice since it has no Rigidbody attached, it has only a Box Collider 2D attached. So far this was enough (it is a 2D game).