Well - I am not from the PRTG/Paessler support - but I can tell you out of experience that especially IMAP and other mail related services might act differently - interpret the official RFCs differently - even thought just slightly.
E.g. Lotus Notes / Domino servers are pretty harsh - some Linux based IMAP servers are a bit - interesting as well.. and of course some Windows solutions as well...
It could be it is because your password has some very special character that might not translate well in the terminal emulation - or just because the IMAP server is a bit shaky.
The great thing is you found a nice work-around for it - I like it! Still - I don't think the sensor itself has an issue - I personally wouldn't want Paessler to send the text-quotes by default - I rather control it myself as you did :-)
Really thank you for sharing this! I will definitive keep it in mind - it would be nice to know what software is used on the server - if you do - cause this could actually help a lot as well!