There isn’t a way to remove the cloud file but keep the file locally and still within odrive’s view. Since odrive is a fully bi-directional sync engine it is going to always want to sync up the changes that occur on either side to make sure everything it the same.
If the goal is to remove the share, you can always just delete that share link or Space, which will remove access to the data without removing the data, itself:
Otherwise, if you want to keep local data but remove it from the cloud, you would want to move the local data to a location outside of an odrive folder, so odrive no longer sees it.
Alternatively, odrive2 has a “Backdown” functionality that is coming that will allow what is essentially a “reverse backup”. This works similarly to traditional backup to the cloud, except it does a “backdown” of your cloud data to a local folder. Deletes in the cloud are not propagated to the local folder.