The rate attribute is a live reading and goes to zero when the flow stops (or the valve is closed) as shown in your screenshots.
The rateFromVolume attribute is an average over the time between volume reports, not a live reading. I had it in there as a cross-check. I don't recommend using it. To your question about why it didn't reset: rateFromVolume only updates when a volume report arrives, and the device stops sending those once water stops moving. So it holds the last average until something triggers a new volume read (your Refresh did).
IIRC the device only reports battery voltage, not battery percentage, so the percentage has to be computed by the driver.
The valve was designed to use 4 lithium AAA batteries and their voltage range (1.4V-1.8V) is higher than alkaline batteries (1.2V-1.6V). From the attribute list you can see that your valve reports a battery voltage of 6V, which is 25% of the way between 1.4x4 and 1.8x4.
I've noticed that the flow rate stays at 0 during short periods (flushing the toilet is clearly considered a short period). Furthermore, when I turn on a water-using appliance (for example, my garden sprinkler), the flow rate stays at 0 for several minutes before the actual flow rate is measured. Similarly, when I turn it off, the flow rate remains for several minutes, even though no more water is being used.
The problem seems to be the reporting interval. When water flows, you should see reports every 5-7 seconds. That's what I see here. In your logs, they are 5 minutes apart.
Try setting the Flow rate minimum for auto-reporting to 100.
If you don't need volume reports every second, you might want to set the volume minimum change to trigger a report to some larger value as well. You had it set to 100 (mL) in your previous screenshot, 500 is probably good enough (what I use).
The % calculation uses the nominal 1.8V value which is measured at no load. Once installed they would probably drop to 1.7 or so, so what you are seeing seems normal.
I never bothered to fine-tune the battery % calculation, mine have been installed for 4+ years and still read 37% (the valve was operated a couple of times during power outages).
I appreciate that you have kept this issue front & center ! It has really prevented me from shutting off water on the flow rate data, been in "test mode" far too long after buying the valve as a precaution.
The Zero-ing issue has been talked about a good bit both in our forums and elsewhere.
I appreciate the work @hubitrep has done to address this and I'll finally go that way but I first wanted to check if you had plans to address this in the built-in flow meter driver somehow.
I've been sending a CONFIGURE after an unexpected flow rate (duration) to try to reset it and then testing for zero before continuing in the rule, but I'm not confident this is always working as expected.