Conditional function is not working correctly

I’m setting a background color based on win/lost (light green-win, light red-lost).
As you can see it not working the way it should.

I used the formula if(D4>E4) for win (condition 1)
and if(D4<E4 for the lost (condition 2)

My problem is some cells are not being filled in correctly and I don’t understand what I’m doing wrong.
I"m still new at this (just to keep my 78 year old mind active). Thanks for any help and solutions.

SD Padres 2025 Season-T.ods (60.1 KB)

@_dave

PKG
Thank you, it works fine now.