Does MOSFET switching gate drive current depend on supply voltage?
There is a small change in total gate charge with the FET's supply voltage. It is not particularly large, because the difference in Gate-Drain capacitance when going from 24 V to 40 V is relatively small. However, the gate drive current is generated in your IC from a linear regulator from the 40 V input. Therefore with a constant gate drive, the IC will still dissipate more power at higher VIN.

There is an NXP Three Phase Driver IC -- MC34937 which allows the gate drive power to be distinct from the FET bridge supply -- you can use that to either 'move' some of the dissipation outside the IC, or supply it from a DC/DC converter which reduces the power dissipated considerably.