The post How to find passwords in memory (password managers) concluded, that passwords are visible in plaintext if you login to a website. Password managers tend to store the passwords encrypted in memory, but they need to decrypt them in order to sign in.
A memory dump requires, that the targeted machine is running and the victim logs in to an account. The password could be exposed in plaintext and a memory dump could be created (with a cold boot attack or somehow else).
But what about swap? It is usually used, if the RAM runs out of capacity and the memory gets outsourced to disc. The outsourced capacities could contain an unencrypted password, that will be stored "persistently" on disk until it will be overwritten. With a bit of luck, an attacker could analyze the swap of a computer later without the requirement, that the target uses the computer.
So, is a swap vulnerable to this kind of attack?
After reading the answers I did a bit of further research and found a similar post on Askubuntu which suggests to encrypt the swap partition. This should avoid the problems around leaked information in swap memory.