Hey there! Nice to meet you!
It is not possible to remove a purchased or redeemed license—whether it's a game or an app—from an account's order history. Even if the license was refunded, revoked, or subject to a chargeback, you will still be able to view its record in your Order History.
Based on your description and since the username has changed, it is possible that you might have signed in to the wrong account or the account was compromised.
Please check your other Microsoft accounts' Order History to locate the Minecraft transaction with the correct gamer tag.
If it doesn't show up, the account where the Minecraft game was purchased may have been hacked. The hacker was able to remove your account's primary email/security info email and replace it with the hacker's email, which is why you are seeing a different gamer tag (most likely a random system-generated gamer tag).
The only way to recover a hacked account is through the official Microsoft website:
If it doesn't work, and since the email address has been replaced by the hacker, I'm afraid there is no other working method to recover the Microsoft/Minecraft account, and Microsoft Support cannot help either.
You can also reach out to Microsoft Support for further confirmation, as they have the tools and resources to check your account's transaction history:
Type "Billing Issue" > Contact Support > Microsoft 365 and Office > Billing and Payment Updates > Confirm > Chat with a support agent in your web browser
Phone Support: https://support.microsoft.com/topic/customer-service-phone-numbers-c0389ade-5640-e588-8b0e-28de8afeb3f2
Thank you for your kindness and understanding.
Best regards,
Darhyl