HAL_SPI_TransmitReceive_IT(...) forgets to __HAL_UNLOCK(hspi) before __HAL_SPI_ENABLE_IT(hspi, ...)
This occasionally leads to (especially if only transferring one byte) the interrupt executing before the function has unlocked the process, leading to the function returning HAL_BUSY if you were to attempt to initiate another transfer in the transfer...