This problem is reported to be appearing on Redmine 6 and probably will be fixed by the Redmine community support. But in the meantime, the below solution could be used.
Problem description
The problem itself could be checked in the below pictures:
Solution
So, the solution in the template could be this one:
{{variant_hours | times: 1.0 | round: 2}}