If i scale object, collision not working

I using BoxCollider2d.The object consists of three parts: body, top and bottom. I scale the body, top and bottom moving relative to the body with a script:
script transform.position = anchor.position;.
It scaling, by pressing buttons up and down, collisiont is not working.
Download archive

script transform.position = anchor.position;
![alt text][1]

try using transform.LocalPosition

looks like your scaling in the middle is off, could be physics debugging to be honest.

Your project is done. I have provided everything for testing your game[42151-for-test.zip|42151]. If you want something more better, please send the details of what you want. If it works for you, please don’t forget to click on the answer solved button beside my post