@AmberV, for Quarto, there is no need to fix cross-reference markup this way. All one has to do is use its proper markup for the element being referenced.
If I had the following:
## Text {#sec-text}
Lorem...
This would work anywhere else in the project (regardless of Book/Website).
So on and so on [@sec-text].
The same goes for Figures, Tables, Listings, and Equations, apart from Conjectures, Corollaries, Definitions, Examples, Exercises, Lemmas, Propositions, and Theorems.