Tommy, I solve that problem by putting the <ref> tag immediately following the text and using a new line for the citation and another new line for the </ref> tag.
... but I only do that on profiles that I do not manage. For the ones I manage, I name all <ref> tags. I used to put all the <ref name="something"> citation here </ref> immediately under the Sources heading, with the <references /> tag immediately under the last citation. I found this worked very well, completely eliminating the bloat in the biography and it was also very helpful to have all the citations in one place.
I used to use the span tag to suppress the line of numbered links this produces, until WikiTree changed the rule to make it a no-no to use span tags for this purpose. I then had to go through all the profiles I created to remove the span tags. The line of number links that are displayed immediately below the Sources heading on the view page actually serves as a sort of TOC for the sources that immediately follow it, although I would prefer not to have it visible.
Then WikiTree changed the rules so that, for reasons I cannot fathom, they require the <references /> tag to be on the line immediately beneath the Sources heading and also require that the <ref name="something"> citation </ref> must be used in the first instance, after which the <ref name="something" /> can be used.
These arbitrary new rules, not at all needed to comply with any language constraints, create a monumental amount of work for me to have to again re-format all the profiles I created, but I found a solution that still keeps all the citations in one place and out of the biography text flow on the edit page, plus has them as the first instance before using the <ref name="something" /> to invoke them.
I am gradually moving all my <ref> ... </ref> citation sets to the top of the profile, where I make the line of numbers linking to the citations look purposeful by preceding them by the line <sup>''source index:''</sup> (the 2 apostrophes are the code for italics, not a quote mark). This is also less desirable (in my opinion) than having the citations on the edit page actually appear under the Sources heading, similarly to how they appear on the view page.
This is a very long and tedious job (although, for those who set store by such things, it greatly increases my contribution count) and is only made more so when some well-intentioned member decides to change the format of a profile I have not yet gotten to by removing all the <ref> citation </ref> tags and inserting them in the body of the biography. More often than not, when they do this, they foul the format by either not putting a citation at the first instance of it in the biography, adding it to the <ref name="something" /> tag instead of replacing it (causing the same number link to appear twice at the same place), or fouling the formatting completely by an error like omitting a closing </ref> tag. They don't usually contact me about it at all, but occasionally someone will write me a long message in which they go to great lengths to gently explain to me all about how what I did is not the way code works.
EDITED TO ADD: See my father's profile for an example.