I came across this post on /r/SteamDeck which is quite relevant to your question.
TL;DR, the deck uses a passthrough circuitry when it's 90% charged so the battery stops getting power while still keeping the deck powered on. This means you can safely put the deck to sleep while leaving it plugged in(4) and you won't have to worry about it degrading the battery.
For reference here's the original /r/SteamDeck thread:
I've done both my own testing as well as a lot of research based on
trusted reviewers, so here's a summary of a few important notes about
the way the Deck charges:
Passthrough is used when you plug the Deck in at more than ~90%
charge. This means the battery is not being used, all power is pulled
directly from the USB port. This also means that leaving your Deck
plugged in 24/7 will not harm the battery at all.
The Deck can not charge with more than 45W, in practice it tends to
not exceed 40W.
The Deck charges at 15 Volts, which is important because it means that
18W PD will not work at all as it maxes out at 9V. Passthrough at 18W
might work but I haven't tested that yet.
The Deck's charging controller always tries to pull 38W even with a
30W charger! This will usually cause the charger to shut down and
restart, meaning that charging will constantly start and stop (German Source).
TLDR: Do not use PD chargers below 38W if you want to make sure the
Deck charges correctly! Do note that this can and likely will be fixed
with a firmware update in the future. (EDIT: Looks like this update
has fixed the issue.)
The Nintendo Switch charger has a 39W PD profile at 15V 2.6A, so it
can charge the Deck just fine.
EDIT: The 15V minimum might only count for charging while playing. If the Deck is idle or sleeping or shut down, 9V and 5V charging
should work fine albeit slowly.