Smart organizations trade guys like this (top players who they know they can't keep long term due to cost/inability to reach an extension/desire to be somewhere else) with 1.5-2 years of control left rather than waiting for them to walk for a draft pick (a draft pick that doesn't even come in the first TWO rounds anymore at that)
Dumb ones wait too long (Orioles and Machado, Red Sox and Betts, Angels and Ohtani, etc...)
It sucks and the fans hate it at first but sometimes it's just the right thing to do
(All that said I still hope they can sign him long term but if feels like that might be a problem)