Assange being in the Ecuadorian embassy would not have prevented Sweden from building a case and charging him.
The UK urged Swedish prosecutors not to question Assange in the Ecuadorian embassy,[1] though Swedish prosecutors eventually did so. When Swedish prosecutors wanted to drop the investigation, British officials urged them to continue it:[2]
> Don’t you dare get cold feet!!!
But immediately after the US began extradition hearings against Assange in London, and there was a debate over whether to give the Swedish or American request priority, Sweden dropped the case.
Just to top it off, Swedish prosecutors altered witness testimony[3] and UK prosecutors deleted emails relating to the case.[1]
The investigation was dropped because it had already served its purpose.
The UK urged Swedish prosecutors not to question Assange in the Ecuadorian embassy,[1] though Swedish prosecutors eventually did so. When Swedish prosecutors wanted to drop the investigation, British officials urged them to continue it:[2]
> Don’t you dare get cold feet!!!
But immediately after the US began extradition hearings against Assange in London, and there was a debate over whether to give the Swedish or American request priority, Sweden dropped the case.
Just to top it off, Swedish prosecutors altered witness testimony[3] and UK prosecutors deleted emails relating to the case.[1]
The investigation was dropped because it had already served its purpose.
1. https://www.theguardian.com/media/2017/nov/10/uk-prosecutors...
2. https://www.theguardian.com/media/2018/feb/11/sweden-tried-t...
3. https://www.republik.ch/2020/01/31/nils-melzer-about-wikilea...