Select your unit to retrain and after pick onother unit (it must be equal) and drop it on the unit you put to retrain.
For ex: you have a unit whit 20 you retrain it, the computer will add more 20, but you already add 20 because you merge that unit, result the unit in the next turn will have 60.
I havenīt tried if after the unit will always be that size when you retrain it again.