1098 T and 1099 Q - Paid in 2022 for 2023 Spring Semester

My daughter has an associates degree and has used 2 AOTCs thus far. 

She worked the past few years but decided to go back and get a bachelors starting school in Jan 2023. 

 

In Dec 2023 she paid $ 4,024 tuition.

In Dec 2023 she withdrew $2,024 from a 529 plan anticipating the remainder would be a $2000 AOTC. 

1099 T received as expected with Box 7 checked to indicate for academic period starting 2023. 

1098 Q came as expected from 529 plan. 

 

After entering in Turbo Tax, it didn't give the result I expected. 

It counted the earnings ($1320) of the 529 withdrawl  as income rather than college expense reimbursement.

It gives a $2500 AOTC  rather than the $2000 expected. 

 

Is this supposed to be how it works? Or have I don't something wrong in Turbo Tax.