It looks like Home Assistant’s native typing feature infers that the string value 0.20 appears to be a number so it converts it to a number (and to express 0.20 as a number simply requires 0.2 without the trailing zero).
Here’s an example to show that the formatting does in fact work when processed by python. Notice how the number is padded with zeros to make three decimal places.
The same technique doesn’t work in Home Assistant because the result is converted from a string to a number (by the native typing feature).
The reason why it worked with the leading $ symbol is because $0.20 is interpreted to be a string and there’s no attempt to convert it to a number. To prove the point, the following template prepends a ~ character (anything other than a space) and that makes the result clearly a string that cannot be interpreted as a number (notice how it indicates the result is a string, not a number like in the previous example).
In this case, I don’t see a way to work around native typing (other than disabling it … which will eliminate its usefulness everywhere else). I doubt you want to add a useless character (like ~) to the value to force it to be understood as a string.
The sensor’s value will have to remain the way native typing generates it. Just speculating but maybe there’s a custom card that allows formatting values so you can present it in the Lovelace UI in the way you want.