issues with logic for detecting if an entity is in a box

the values here are taken from an interaction, width and height arent modified while their _half counterparts are half of their original values minus one. my issue is that this roughly works but it runs even when an entity with the tag hitbox is slightly outside of the interaction at lower values and just straight up stops working at values past 2
Continue to help post