If you take a refund of qualified expenses that were paid with 529 money and deposit it in your checking account, there could be tax issues, because the amount refunded may be considered a non-qualified distribution, depending on the timing of the original distribution and whether or not there will be any more 529 qualified expenses paid later this year.
Recontributing the refunded 529 dollars to a 529 account with the same beneficiary is explicitly allowed by the IRS, as long as it is done within 60 days of the refund date. For many people, this may be the easiest way to avoid any tax issues or questions from the IRS. Just keep good records so you can show what happened.
My experience with this exact situation, more than once, is that the plan administrator makes no distinction between new contributions and recontributions of 529 money that has been refunded by the school. To the plan administrator, a contribution is a contribution is a contribution. This is why, as noted above, it’s important to keep good records detailing the original distribution for 529 qualified expenses, the school’s refund of part or all of this distribution, the recontribution of the refunded amount in a timely manner, and any subsequent distribution from the 529 account for qualified expenses.