To hide an entire collection of variables from publishing to team libraries, you can still use prefix the collection name with _ or ..
To ensure that I understand correctly, you’re only having issues hiding a collection of variables using the underscore? If so, do you have an example file you can share with our team, so they can investigate this further? https://help.figma.com/hc/en-us/requests/new
Be sure to use your Figma email address and add support-share@figma.com with edit access (don’t worry - this won’t affect your billing).