Obviously, if the mining is done off-earth anywhere, it will not contribute to the CO2 problem, =ASSUMING= that it does not require on-earth energy resources to put the power generation there.
Crypto mining also stops being a problem when 100% of on-Earth power generation is de-carbonized — in that situation, it is no longer diverting energy generation that could be used to displace/reduce remaining CO2-spewing energy generation.
The problem is: While CO2 power generation is still active, and especially when it dominates, every kW of electricity used for crypto mining either directly generates CO2, or it uses clean generation that could otherwise (but now does NOT) displace a kW of CO2-based generation capacity.