From your answers I do not think your battery is causing the fault.
When the ignition is turned to position 2 the electronic automatic transmission ecu ( eat ecu) receives this information and simultaneously reads the voltage signal received from the xyz switch nominally 12 volts.
The eat ecu constantly monitors the signal received from the xyz switch and if the signal ceases for more than a fraction of a second ( when changing gear manually), through a short or open circuit, misaligned or faulty m&s switch or voltage drop caused by poor battery when cranking engine it triggers limp mode and flashing m&s lights immediately.
If it were a faulty battery I would expect the fault to be present soon after starting the car certainly before you drove off and you would be starting in 3rd gear (default settings for limp mode).
The problem with intermittent xyz switch circuit faults is that the fault does not clear itself when the cause ceases only when you close the system down so you don't know how long the fault is present.
If you have access to nanocom, hawkeye or test book diagnostic tools you can read live data from the xyz switch in both the bcu and eat ecus.
When the fault is active note the signals to the wxyz feeds when selecting prnd321 at both bcu and eat ecus and compare them with each other and the table found in rave in the automatic transmission section. This may indicate if you have an electrical circuit fault.
Be aware if you use nanocom you may need to reverse the column headings from wxyz to read zyxw in either the bcu or eat table, it will be apparent when you compare them with rave table. This is not fool proof but could help.
If you don't have a copy of rave the official land rover discovery work shop manual you can download it free on the d2boysclub forum and read up on automatic transmission to better understand your problem.
I would also experiment by driving some distance in 1st gear manually to see if you can create the fault in 1st gear, then 2nd , 3rd and finally d changing manually each time to see if you can pinpoint exactly when the fault occurs as it could be a physical fault in the gear box or the transmission fluid that that changes when it warms up.