Stop a ball on the point of collision problem

Hello everyone,

This is the problem:

I want the ball to either stick at the point of collision (on the green part) or bounce at the point of collision (the blue part). Currently the ball sticks and bounces fine except on the edges. This is my code:

    private Transform _formerParent;
    private void OnCollisionEnter2D(Collision2D other){
        _formerParent = other.transform.parent;
        other.transform.parent = transform;

    }
    private void OnCollisionExit2D(Collision2D other) {
        other.transform.parent = _formerParent;
    }

Basically, I make the ball parent to the green part when they collide (to prevent change in x and y direction of the ball), then I make the ball static when it collides with the green sticky part:

    private void OnCollisionEnter2D(Collision2D col)
    {
        if (col.gameObject.tag=="Sticky")
            Ball.GetComponent<Rigidbody2D>().bodyType = RigidbodyType2D.Static;

    }

Why on earth does the ball bounce then become static? I know for a fact the issue is with the two colliders, but I have no clue how to fix it. Is this a Unity bug that’s un-fixable or is there a way to make unity do what the code is telling it to?

if my problem is not clear, this is a short clip I took:

https://im4.ezgif.com/tmp/ezgif-4-18430f3234.mp4