Glitch in the deductions and credits section

This makes no sense.  I believe that there is a glitch in 2020 TT CD.  I have two lines for my 1098.  One is $20k and one is $7k.  When I delete the $7k and leave the $20k, I will get MORE state refund.  Federal didn’t change.  When I add back the $7k with the $20k (total $27k for the two lines), I will get LESS state refund.  Federal doesn’t change.  How does that even make sense?

 

Now if I delete the $7k line and I go into the $20k line, edit and combine the two figures.  I edit the number to $27k, both federal and state refund will increase quite a bit.   Why does TT not increase my refunds when the two 1098 lines are separated, totaling $27k?  

 

Why does tax purposes treat one line totaling $27k differently than two lines totaling $27k?