Retirement tax questions

It turns out that I incurred a loss for my 2022 excess contribution (Jan 2022). My custodian informed me that they distributed $5.9K (Mar 2023) instead of the $7K I contributed.  How will the loss be handled tax wise?