I believe this problem started with iOS 9. My iPhone is connected to an IMAP account and used to correctly maintain unread status. Now it is common for - especially but perhaps not exclusively - the first unread e-mail to lose its unread status.
I mark the message as unread and it shows the unread status, the unread count increases, it sync with the server (status line spinner runs and stops). Later on, sometimes very shortly (seconds) afterwards, the unread count has gone down again and the message has lost its status. This seems to happen whether the message view, the unread view, inbox view or all inboxes view is the view that is left open. The message is not open on another device.
My Google skills are not turning up much for this. Any ideas?