Right it just happened to me again however I noticed something - I am in my home and my iPhone is normally connected to my home wifi. I was in the iPhone mail app looking at a list of emails in my Outlook inbox. I swiped an email and deleted. At this point
the message prompting me to input my Outlook password appeared but at the same time I noticed the wifi connection had dropped and my device had reverted to my mobile's 4G connection.
Maybe therefore the issue can occur if a) you are in your iOS mail app and the same time as b) your wifi connection drops and your device reverts to 4G.
I am not an expert in network technology so it's just a theory. Will bear this in mind the next time the problem occurs.