There can be a number of things that cause tracks to come off, but usually, the primary reason is badly worn undercarriage. You should not have tracks coming off with new undercarriage if the repairs were done correctly and comprehensively.
Working in mud is hard on undercarriage and facilitates tracks coming off, if anything is out of alignment. There are several areas to look at:
1. Track frame toe-in/toe-out. If you have worn bushes in the outer hub of the sprocket (where the track frame pivots) - or worn bearing shells in the diagonal braces that are bolted to the inner part of the dead axle - then you will possibly have excessive toe-in or toe-out of the track frames that will be assisting the tracks to come off. Check the toe-in/toe-out by driving forward and stopping, and measuring across the center of the tracks, front and rear. Then reverse up, stop and measure again. Compare the front and rear measurements, there should not be more than about an inch difference. If there's 2" or more, the outer hub bearings need replacement, and possibly the diagonal brace shells as well.
2. You may have a bent dead axle. This is not uncommon. This will also appear as a wide variation in toe-in/toe-out measurement - but there will be little or no wear in the hub bearings or diagonal brace shells.
The only way a bent dead axle can be repaired is to split the track, remove the track frame, dismantle the final drive, pull the dead axle, and straighten it by pressing or building up and re-machining.
3. You may have broken or badly worn idler guides. Check that the idler guide manganese wear plates are still in place in the guides. These small wear plates are tack-welded to the blocks on the track frame, and to the cast frames that locate the idler.
If these wear plates are badly worn or missing, the idler will tilt from the vertical in the track frame, and this will assist in the track coming off.
4. You may have a twisted track frame. This is also not uncommon. The two projecting sections of the forward part of the track frame (that go each side of the front idler) have a tendency to twist.
If this part of the track frame is twisted, the idler won't sit vertical, and will not be vertically inline with the sprocket and track rollers.
The fix is to split the track, remove the idler, and shim the idler guides to bring the idler back to vertical.
In severe cases, the idler may have to be removed and the ends of the track frame heated and straightened.
5. You may have bent carrier roller supports. This is not uncommon. The carrier roller supports bend downwards and the carrier rollers then become misaligned with the sprocket and idler, leading to sideways pressure on the track chain.
Any time an undercarriage renewal takes place, a string line needs to be positioned from the centerline of the sprocket to the centerline of the idler (both top and bottom), to ensure correct track roller, sprocket and idler alignment.
6. You may have a bent idler push rod. This is the rod that goes between the idler yoke and the hydraulic track adjuster. It's not uncommon for this rod to bend and cause the idler to twist sideways inside the track frame.
This will assist with making the track come off. The rod usually bends right near where it fits in the idler yoke.
I hope this give you some more ideas on where to check. Come on back with what you find.
Regards - Ron.