Short answer
HubSpot's KB: anchor names must start with a letter and use only letters, numbers, hyphens, underscores, colons and periods. Anchor links on CTAs need Track clicks through the browser selected. HubSpot doesn't recommend anchors in emails because some clients don't support them.
1. In HubSpot
The relevant screen in my demo portal.

2. Worth knowing
Use short, readable anchor names; they show in the URL when someone shares the link.