Music makes a clicking noise when it starts looping

Blindly shifting the loop points around is going to take way too long and you might not be able to get the results you are looking for just because of how the song exists sonically.

I assumed the music you are using is from an asset pack since you talked about shifting the loop points around. If you know the BPM of the song because you wrote it, and in fact if you have the project files that constructed the song, it's easier to tame any clicks in the loop.

Regardless,there is a hacky solution to this that you can do in the mean time.
The hacky solution is, if the song is only meant to be used in a section of game play that will only last for a short amount of time, you can just manually loop the song in Audacity or whatever audio you are using. It might be easier to get an effective loop in the software rather than hunting for the exact right sample to start the loop from (or worse case scenario, you can create small cross fades to hide the loop point). Just manually have the song loop 3 or 4 times, and then set the loop point for the length of those 3 or 4 times, that way the click only happens occasionally, so hopefully it's less distracting.
Like I said, this is a pretty hacky solution, though.

There is also the option of creating a fake crossfade to attempt to mask any clicks in the loop, but I struggle to explain how this works. It's pretty simple once you see it, but tough to explain. Unfortunately I'm not in a position to take screen shots or record a video on how to do so at this time.
@Pampan_Zero 2 minutes should be just right for a music track, so it's unlikely it's a buffer problem.
if it's not 16-bit 22k, see if you can lower it.
if it's lower, then I'm out of ideas.
Blindly shifting the loop points around is going to take way too long and you might not be able to get the results you are looking for just because of how the song exists sonically.

I assumed the music you are using is from an asset pack since you talked about shifting the loop points around. If you know the BPM of the song because you wrote it, and in fact if you have the project files that constructed the song, it's easier to tame any clicks in the loop.

Regardless,there is a hacky solution to this that you can do in the mean time.
The hacky solution is, if the song is only meant to be used in a section of game play that will only last for a short amount of time, you can just manually loop the song in Audacity or whatever audio you are using. It might be easier to get an effective loop in the software rather than hunting for the exact right sample to start the loop from (or worse case scenario, you can create small cross fades to hide the loop point). Just manually have the song loop 3 or 4 times, and then set the loop point for the length of those 3 or 4 times, that way the click only happens occasionally, so hopefully it's less distracting.
Like I said, this is a pretty hacky solution, though.

There is also the option of creating a fake crossfade to attempt to mask any clicks in the loop, but I struggle to explain how this works. It's pretty simple once you see it, but tough to explain. Unfortunately I'm not in a position to take screen shots or record a video on how to do so at this time.
My friend and I write the music for my game using an online music sequencer and, fortunately, looping music doesn't take me long. However, it's possible that the loops I make are imperfect and that is why you hear the click in RPG Maker. But I also assure you that I have music and BGS that should not, in any way, have that problem and yet it does...

Making the music loop several times is a good trick. I've already did it in some background sounds so the click would take longer to be heard. But after learning that the program seems to be a bit picky about the loops, we'll try to make the music more foolproof (not using too much reverb at the end of the track or avoid using some instruments). I think it's the best we can do...

At least it's a good thing that not all of my music has this problem.

Original thread: https://forums.rpgmakerweb.com/threads/music-makes-a-clicking-noise-when-it-starts-looping.158468/