Hello, I hope you are well, my name is***** will see if I can help you with this.
There are two reasons that I know of for this happening, one is a faulty ignition switch, the ecu doesn't receive either enough or any power during cranking, due to a faulty switch and fails to start even thought the engine is turning.
The other situation is where the battery or the wiring are in such a condition that during cranking, the voltage falls below that of which the ecu can operate at.
Although the battery may be showing voltage with no load, during cranking, the load may be such that a weak battery, whilst still cranking, drops its voltage output too low.
Sometimes, once the key is released, the voltage rises enough for the ecu to work and the engine is still spinning fast enough from the previous cranking that it starts.
Can you use a multimeter and measure the voltage at the vehicles battery ignition off, then using an assistant, measure the voltage at the battery during cranking.
Next I would like you to, with the multimeter still set in voltage, place one lead on the earth terminal and the other on the engine block, digital multimeters show voltage difference, this would show if there was a bad earth.
If the voltage during cranking drops to around 10 or below I would consider a boost pack or different battery to see what difference it makes, if there is voltage difference between the earth terminal and engine block, there could be a bad earth.
Please do report back with the findings and I will assist you further if I can.