I've had this problem lately. These events occur when switching one sample to other sampling rates. Can you try measuring by pressing the "Q" key? To synchronize the tempo from the end of the track, press and hold the last part of the track and press the "Alt" key and drag. it doesn't sound like the first sound, but it still saves 80 percent of the sound.
To avoid such problems
If you are recording live instruments, the "48 kHz" cycle is sufficient.
Otherwise, 44.1 kHz is ideal if you record.
Your registration start step should be correct to avoid problems in the track-to-end loop. Changing along the way is wrong and wastes time.
As far as I know it's not the official procedure.
I wish you good work.