In case you are interested in my test procedure:
I log the battery Full Charge Capacity (FCC) while I quickly drain the battery and quickly charge the battery. I drain the battery quickly by running "mprime" (aka Prime95) torture test which loads all the CPU cores draining the battery as quickly as possible. Once the laptop powers off, many times I will leave it a little while (sometimes I will just connect the charger shortly after the laptop powers off). Once I connect the charger, I boot & log into the Mac as quickly as possible in order to quit "mprime" if it is still running if the system hibernated so that the laptop will charge as quickly as possible. If the system did not hibernate, then I quickly restart the battery logging so I can monitor the Full Charge Capacity during charging (without "mprime" running the system will charge as quickly as it can). I let the system charge to 100% and leave the logging feature running for a while after reaching 100%. Usually issues are most noticeable at the extremes when the battery has less than 10% charge or when the battery is at or near 100%.
Then I examine the Full Charge Capacity values to see how they changed. Ideally the FCC should remain the same throughout this process, but this may only happen on a new battery. Normally there will be fluctuations in the FCC value. Small fluctuations are fine, but larger fluctuations usually indicate a failing battery. When the fluctuations get to several hundred or more, it usually indicates a hardware issue with the battery. Here is the command I run in the macOS Terminal to log the battery details while saving a copy to a file on the Desktop called "battery-test.txt":
sudo pmset -g rawlog | tee -a ~/Desktop/battery-test.txt
This command will prompt for an admin password, but nothing will appear on the screen as you type the password. "sudo" is what causes the prompt for admin privileges which is required for the second command "pmset". "pmset" is a macOS command line utility which can read & configure some power management settings. The "-g rawlog" option provides battery and charging information usually printing updates every minute, although some value changes can trigger an update in the information. This command runs continually until terminated by pressing Control + C in the Terminal window. The rest of the command just saves the output seen on the screen to a file on the Desktop (it creates the file if it doesn't exist, or it appends "-a" to the file if the file already exists).
Something similar can be done using Linux as well using several different commands, but Linux uses "Wh" values instead of "mAh" when reading the Full Charge Capacity information from the battery, so the numbers will be different.
You don't need to use this method for your laptop because it is clearly evident that the battery in your laptop needs to be replaced. This technique I outlined can be useful to find failing batteries when the battery condition is "Normal" and the Apple Diagnostics pass. I just thought I would share this trick to help you with any other laptops which may have hard to detect battery issues. FYI, if you check the battery condition when the battery's FCC value is at its lowest, you may actually see the Battery condition change to "Service Recommended" if it was showing "Normal" before. Plus the Apple Diagnostics are more likely to detect a battery issue when running the diagnostic when the FCC values are low or at the charge level where the FCC values fluctuate the most.
FYI, you can determine the battery's capacity in relation to its original Design Capacity by using the following formula:
(FCC / DesignCapacity) * 100
Of course the FCC value can fluctuate so using the lowest value will give you the worst case value. You can also calculate what the FCC value is for a battery 80% of its original Design Capacity.
FCC mAh value for 80% point = DesignCapacity * .80
Unfortunately command line utility to retrieve information from the battery only works on Intel Macs. With Apple Silicon Macs, Apple for some reason changed the FCC value to a percentage. Somehow it is possible to get the actual FCC value in "mAh" since the third party app Coconut Battery does it, but I don't know how Coconut Battery is retrieving this information from macOS. I haven't had the time to investigate other options.