Here in the US, the NEC dictates this, very specifically because of this exact issue. You are REQUIRED, per Article 430.122, to size the feeder circuit for 125% of the VFD MAXIMUM INPUT amps, regardless of the size of the motor connected behind it. The motor will still only draw as much current as the load needs to do the work, but the intent of the NEC rule change is to cover what the VFD might be used for by someone else in the future, who reads the nameplate and decides LATER to use a larger motor.
Then because of that change, which originally took place in the 2002 code under a different clause, UL has changed their rules on getting a VFD UL listed. In the past, VFDs were not actually required to provide motor protection, because they were classified as "Power Converters". Some mfrs started including it anyway, but UL was not actually requiring it. Now UL says if they are "Motor Controllers", they must provide both the running overload protection (OL) AND the motor Branch Short Circuit and Ground Fault protection. This must now be based upon the connected motor, NOT the incoming power. So when you program the VFD with the motor nameplate data, you are at the same time programming the OL and the "Electronic Circuit Breaker" protection functions that are built-in to the VFD.
Word of caution here: Not all VFDs are created equal, and a lot of the cheap junk showing up on places like FleaBay are either not UL listed at all, which means they do NOT provide this, or they are using a trick of getting them UL listed as "Power Converters" still, which allows them to ignore this requirement. They cannot lie about it though, so look at what the UL label says; if the label says something to the effect of it being a "Power Converter", it may not be providing this level of connected motor protection (it also may, it's just not required to, so you have to check). If it says "Motor Controller" in any form, it must then provide this.