Health app not tracking climbed floors
I've been using the Health app to track walked steps and climbed flights, but sometimes the climbed flights are not counted correctly.
I've been hiking the same path for a year now, always keeping my iPhone in the right pocket of my trousers, so I should get more or less the same amount of climbed flights but instead some days I get around 40 floors while others I get 4. It looks like sometimes the phone stops tracking climbed flights.
I've tried rebooting the iPhone with no luck.
My system is updated to the latest version available right now (iOS 12.4).
Does anyone know how to fix this issue?