Still on this subject, if you get to see that your coins were to be moved from your wallet and do a double spent directing all your btc to another wallet you own, but with a high fee in order to have it confirmed next block, for example, would it in practice prevent the theft as it would be confirmed first and the other transaction would be nullified as there would be no source btc for it to complete?
Not with any reliability.
While it is
possible that the second transaction with the higher fee
might get confirmed first...
Most nodes will refuse to relay a transaction that spends outputs that are already spent in their mempool. Therefore it will be difficult for most miners to even know about the second transaction.
Most miners will refuse to accept a transaction that spends outputs that are already spent in their mempool. Therefore, it will be unlikely that the second transaction will get confirmed even if miners have received it from peers.