Error happens when switch between WAV(APE/FLAC) and MP3 file format

It’s not an explanation of why your issue is happening, but why not get all your music in a consistent format? Get them all as good quality flac files (I think it’s the best/most useful as it can be full quality and takes less space than wav).