You can backup IMAP emails using an IMAP Backup Tool, I can suggest the best tool because I’m also using it. Try the GainTools Cloud Backup Tool, which can connect to your Gmail account through IMAP and allows you to download emails in multiple formats, including PST. Simply enter your Gmail login details, select the folders to export, and choose PST as the saving option. It maintains folder hierarchy, attachments, and email properties during backup. The software is easy for non-technical users and they can use it without technical skills. The tool works with all Windows versions like 11, 10, 8.1,8, and 7, without needing any application.

Visit here: https://www.gaintools.com/backup/