No, but there are ways around it.
Because you're married the spouse with a gain can transfer the asset to their spouse, then they crystalise the gain and use the loss.
Losses are automatically shared between spouses unless they formally elect not to do so.
Of course, isn't there quiet old wording about a wife's gains being charged in the husband.
I've no idea what was in my head when I replied. Is there something about the personal allowance not being shared?
Thanks for correcting me.
Teasing this out further ... not doubting the advice above, what was the impact of that Ryan case where Mrs. Ryan moved to Italy to sell her Ryanair shares?