Look, my answer i'snt probably gonna take your question in consideration just your problem. Sorry about that, but I think will help you.I also have a Ryzen 7 (4800h) laptop (Lenovo Legion 5 15ARH05H) (I'm currently writing in it) and had the same issues (I even tried a few distros and a lot of them worked well but had a newer kernel).The HWE kernel was ...
Yes you can.
You'll just have to edit /etc/systemd/logind.conf and change the default behaviour for the lid sensor.
Open Terminal and type
sudo nano /etc/systemd/logind.conf
input your password, and look for the line containing HandleLidSwitch. Uncomment it and replace suspend with ignore, so that is looks like this:
Use Ctrl + O to save the file, and ...