There are 2 error i have notice in my dovecot setup while my iPhone Mail app given POSIX 96 error.
First time dovecot given the error "imap-postlogin: Error: ERROR 145 (HY000) at line 1: Table './last_login/lastauth' is marked as crashed and should be repaired", that is have fixed by repairing that table in mysql.
Second time dovecot given the error "imap(......@..........in): Error: mmap() failed with file /var/vmail/vmail1/..../Maildir/dovecot.index.cache: Cannot allocate memory". For this error i have increased default_vsz_limit from 256M to 512M.
Overall My Understanding is Dovecot having any error in it plugin apart from IMAP protocol, other clients are ignoring it, where us the latest Mail app throwing the error in client side. So blaming iOS18 or new Mail app is not good.
May be i can help you to fix if you share the truncated logs while accessing Mail app to your server.