I just wanted to follow up in case anyone else has this issue.
I experimented a bit yesterday and now believe I was just letting the battery run too low before trying to charge and play at the same time. I was letting it go below 20% and when I continued to play it was draining power faster than it was charging the battery.
When I let it charge to 100% and left it plugged in while I played yesterday, it managed to charge faster than I was draining power.
I think the problem is solved.
Thanks everyone for the suggestions.
I know that you mentioned that the problem is solved. But that shouldn't be happening at all.
Has this been happening to your switch from the beginning or is it more of a new issue?
To me it kind of sounds like either your charger is damaged or your Switch's battery is damaged. I had a similar issue with my Switch and eventually it got to the point where I couldn't unplug it at all because the battery would go from 100% to 0% in seconds. Hopefully it's just the charger. Though replacing the battery is cheap and relatively easy if it ends up being that.