Why do you think Alphys is wearing her dress when you save the lost soul, but when her soul is absorbed,she is wearing her lab coat?
One could assume that this is because there is no proper battle sprite for Alphys. After all, Alphys never has her own battle in the game. She does appear alongside Mettaton during his quiz show, but her sprite is rather small.
However, she does have her own date sequence in which she appears at a proper size.
It’s likely that Toby simply reused the sprites from this date sequence for the battle.