I attempted to temporarily "resolve" it by just setting the height to 1000 (shape.height = 1000) before the check, doing the check, and then setting it back to 10 but for some reason that also doesn't work. When I set the height to 1000 in the inspector, and then run the game (EVEN WITH THE ABOVE HEIGHT CHANGING CODE), it all of a sudden works.
I feel like this should be telling me something obvious but I'm just not experienced enough to know