On the Custom Functions Debugging page, it says:
We recommend using custom functions with a shared runtime, unless you have a specific reason not to use a shared runtime.
Despite this, yo office has only one option for creating a custom functions add-in project, and it creates functions using the custom functions runtime, not the shared runtime. So once you've scaffolded the project, you have to go through this series of error-prone steps to switch over to using the shared runtime. And you have to repeat those steps if you re-scaffold your add-in (for instance, because of major changes or improvements to the project generated, such as using Webpack 5).
It should have an option to create a shared runtime project (marked "preferred" to match with the recommendation above), or if it can only do one or the other, it should be shared runtime to match the recommendation above.