IMAP settings always roll back to default

I’ve tried multiple times to change port and security policy and other settings, everything just rolls back to default. How can I solve this problem ?