Thanks.
I tested this with macbook air m1 on 12.4. After an hour of the lid closed the battery usage chart did not show any usage. In fact, upon first opening it, there was no battery data in the hour the lid was closed.
This is different than before the terminal commands, where I saw battery usage every hour, even upon first opening the battery usage chart.
I will test further, but I think this solution works. The only thing I changed was using -b (battery), instead of -a (all) because I don't mind power usage when AC charger is connected.