Hm, maybe a timing issue. There is a lot of stuff going on internally when a song ends. Things like preloading the next song, scheduling playback for autoplay and similar. I ran some tests with loops at the end of a song but did not notice random ends. Maybe I did not let it loop long enough? How often does the loop repeat until it stops?