The usual thing to check first is the distance between the backs of the wheels of the bogie that is derailing. I don't remember what the correct range is but you could compare it to bogies that are ok. If the distance between the backs of the wheels is out of range, there will be problems. Too small and the flanges will catch on the guide rails at points.
David
David