The main difference between these two is that one is used in a figuartive way and the other is a literal use of the phrase. "to go off track" is a figurative way to say that something/someone is not doing something correctly or is going down the wrong "path" in any aspect. "to go off the track" is mainly used to describe some sort of derailment normally associated with trains.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.