Which kernel are you using?
6.16.10-200.fc42.x86_64
Which BIOS version are you using?30.03.03
Which Framework Laptop 13 model are you using?
amd ryzen ai 300
Further info:
Suddenly a popup will show critical battery warning 0% → it will jump to like 97% or whatever the real percentage is then. Annoyingly it will also go to sleep mode a few seconds later and I have to wake it up and login again.
This seems to mostly occur shortly after disconnecting my charger?
The problem is the battery. Check that the connector it fitting well and no pins are bent.
If that does not help, maybe there is a bug in the battery bms.
The reason it goes to sleep is because battery below 4% causes the EC to shut the laptop down before it damages the battery. Now in your case the 0% is a false reading, but the EC firmware is not detecting it as false.