You will want to override how Odoo shows the data in the td_price_unit cell of the Invoice Lines:
Instead of this:
<td name="td_price_unit">
<span class="text-nowrap" t-field="line.price_unit">9.00</span>
</td>
Do something like this:
<td name="td_price_unit">
<t t-set="decimals"
t-value="max(2, len(str(line.price_unit).split('.')[1]) if '.' in str(line.price_unit) and len(str(line.price_unit).split('.')) > 1 else 2)"/>
<span class="text-nowrap" t-esc="('{:.' + str(decimals) + 'f}').format(line.price_unit)">9.00</span>
</td>
Note: the complex calculation ensures you never drop below 2 digits, so $10 even will show always as 10.00.