I took a quick look at that line. The issue is the plants have an origin that’s centered while the enemy’s is in the top, left.
That means the enemy is within those values here
It would probably be more accurate if they both had the same origin point and then variance above and below was smaller. Also, the point used as the comparison point on the plant should be where the bullet fires from. That’s the main point.
An alternative would be to cast a ray from the plany’s mouth. If it hits an enemy then fire.
Edit:
For context, I tested your firing or targeting line by adding the draggable behavior to the zombie. This allowed me to test the range. I also added a play sound event on a copy of the for each with your y test range. That gave me immediate feedback as to when the zombie was in that range.