Maybe related? When I tried time-lapse on my Canon M50 I first ran into issues where only a few shots were taken. Turned out my timing between the shutter speed and the timing of the shutter release from the time-lapse functionality were creating a conflict. What ended up happening was the shutter release was signaling while the camera was already taking a picture.