Battery is draining with "Power source: Power adapter" in macOS Catalina I've noticed a strange problem with my 2018 MacBook Pro. Sometimes, when I use it with the (original) adapter, it says that the power source is power adapter, but the battery is still draining and not charging:

This is a huge problem as the level of charge can become very low before I even notice it. Also, I'm not doing any resource-intensive work. As an experiment I left it running and observed the charge get down to 40% before I disconnect the cable and reconnect so the charging would start.
What may be causing this issue?
I found that I could get a port that was not working to start working by unplugging the cable at the power adapter (leaving it plugged in at the laptop) and then reconnecting it. It's not clear to me what this is doing or if it's placebo, but it's odd.