Hi,
You need to add two additional tables: Environment Variable Values and Environment Variable Definitions. To do this, you need to open the component library:

Then you can the two tables (Environment Variable Values and Environment Variable Definitions):

Also in the component library. You can now use a powerFx expression for the visibility of the button depending on the value of your environment variable. In my case, the environment variable is "mea_BtnVisibilityEV"

You will need to save and publish your component, like a canvas app component. Then, close everything and reopen the command designer, the visibility expression will now be inherited from the command library:

It works in my environment (y)
Please tick Accept as solution if the answer is useful.
https://xrmtricks.com/