I had the same problem. If it’s MTH RealTrack check the copper contacts on the underside of the track, you know the curved springy ones? I gave the offending ones a good bend to insure they mated properly. After that, no problems.
There’s a lot of ways to clean dirty track. I use alcohol and a shop towel. DENATURED alcohol, don’t use rubbing alcohol, it’s got water in it.
I have the same track problem, but also with MTH loco wheels. A good cleaning usually solves both. On track I use a scotchbrite pad and on wheels I use a wire brush bit and my Dremel.
Read the MSDS for the two, maybe you’ll change your mind. The water content of 91% Isopropyl alcohol is a non issue, I’ve used it for years, it’s never rusted anything.
Along with that, I solder jumpers every do far down the track. Especially at switches. I also solder long sections of the track together before turning it over and screwing it down. Good luck.
Someone showed me, besides cleaning the tops of the rail heads, use the scotchbrite pad to clean behind the rail heads where the wheels also make contact.