If you have a physical copy of Sea of Thieves, you will still have to buy the digital version of the game. Digital version of games can be played on both systems. So if it was a digital copy you had on your Xbox, you would just download it on your PC because you already own a copy of the game. So if you are planning to switch over from Xbox to PC and its a physical copy you own, you will have to pay for the digital copy.
Also if the computer you are planning to play Sea of Thieves is not somewhat of a powerful PC, Sea of Thieves may not run smoothly even on the lowest settings so bare that in mind.