If I drive my truck for 10 miles the transmission quits working in third gear and overdrive. In addition, the speedometer quits working and the ABS light comes on. Second gear still works and the truck keeps running. If I take the battery loose, it resets the computer and then I can drive the truck for another 10 miles.
You most likely have a vehicle speed sensor issue or a worn 3-4 clutch that is slipping. Turning off the ignition will reset and cause the computers to begin re-reading the VSS and also reset gear monitoring. The fault codes need to be read out on the vehicle to lead diagnosis in the proper direction. You may want to enlist the help of a mechanic, such as one from YourMechanic, who has the equipment to read the faults and recommend the correct direction to correct these issues. If diagnosis lead towards worn 3-4 clutches the transmission will have to be removed and rebuilt.