So I bought and redeemed an Xbox Gold membership, and now I've got an Xbox Game Pass Ultimate trial subscription, will the 3-month Xbox Gold membership be lost if I activate the Xbox Game Pass Ultimate trial subscription?
No it doesn't work.
It may even be taken into account.