Are you familiar with the "Exclude from BOM" option?
When you point to a component, right-click/Component Properties, you have access to the "Exclude from BOM" option (see image). So when this option is checked, your component may be visible, but will not appear in the BOM.
Similarly, the "envelope" option above will exclude that component from the weight of your assembly.
Edit: this option can be managed depending on the configuration.
In fact I get an assembly that has several display states, and many components are visible or hidden depending on the state.
And in order not to take over everything, and risk losing important constraints, I wanted to treat this assembly as is, by providing a nomenclature by display state.
I'm afraid I'll have to go back to work but I'm still waiting for the experts' opinion because I really have a lot of time to save... or to lose :-(
I'm going to do derived configs for each display state, and with your selection method I'm going to remove the hidden elements. In terms of constraints, it's not going to be great but my "Default" configuration will be the original one and I won't touch it, it will have the right constraints.