It is the sending unit on the fuel pump, the part is cheap, labor is the killer, gotta drop the tank. Recall was 97 for the scenario posted above which did not happen but was a possibility and was the reason for the lawsuit and recall as I remember. My 98 has done it since about a month after the warranty ran out when it was new in dec of 97, it was manufactured in sept of 97. I drive by the trip odometer and have for the last 8 or so years... all our 97 and 98 TJ's do the same thing BTW...
When my fuel pump dies I'll fix it... The annoying thing on the 97TJ's are that every time you start it it defaults back to the odometer so you have to hit the button to go to the trip vs the XJ which stays where it last was... Rule of thumb is whoever is driving whichever refills at 200mi....
Just a side note, my wifes oldsmobile also has the same issue, go figure, wife has driven by trip meter since it was new, she has never trusted a gas gauge in her life and keeps a little spiral bound notbook in the drivers side door pocket, notes gas, oil changes, the works.