Changing friction from code not working (2D)

I want to change a collider’s physic’s material from code, I use the code below. I see the material’s friction changing in the inspector, however the collider behaves as if the friction wouldn’t change.

    void checkOnGround() {
        Transform t;
        foreach(Collider2D c in collidingTiles) {
            t = c.transform;
            if(t.position.y - transform.position.y < -Misc.TILE_SIZE * 0.75f) {
                onGround = true;
                myCollider.sharedMaterial.friction = 0.8f;
                return;
            }
        }
        onGround = false;
        myCollider.sharedMaterial.friction = 0f;
        return;
    }

This still has not been fixed, and the enabled/disabled workaround still works. Any update from a unity dev on why this is ?

I had to disable than enable the collider, that’s the only solution I’ve found. It’s a workaround, but this part of unity is buggy.

Here’s the modified code:

    void checkOnGround() {
        Transform t;
        foreach(Collider2D c in collidingTiles) {
            t = c.transform;
            if(t.position.y - transform.position.y < -Misc.TILE_SIZE * 0.75f) {
                onGround = true;
                myCollider.sharedMaterial.friction = 20.0f;
                myCollider.enabled = false;
                myCollider.enabled = true;
                return;
            }
        }
        onGround = false;
        myCollider.sharedMaterial.friction = 0.0f;
        myCollider.enabled = false;
        myCollider.enabled = true;
        return;
    }