When I worked through this last evening trying to add a door to the rectangle, I set the code to tell it to make my rectangle/door to the bottom of the larger rectangle that was already there. It would not work. It would get to be too long or too short even when I asked the code to match the height I needed.
Happy to look at it for you if you click on the “share” button at the top and send me the link. Or on this one, even a screenshot of your code.