Staying well connected is important to bitcoin nodes and miners. Special relay networks such as the Bitcoin Fibre Network exist to ensure new blocks are communicated quickly, and to prevent network fragmentation.
In your example, some subset of nodes have become fragmented from the network. If you sent a tx to those nodes, they would not be aware if it was a double spend, so they may store it in their mempools.
However, transactions need to be confirmed by miners, so if no miners are in the fragmented network, then those nodes would simply wait endlessly to hear about a new block. If the rest of the network knows about the other tx in the double spend, and has confirmed it in a block, then the fragmented nodes would simpy drop the tx they heard about once they reconnect and get the updated blockchain. Any UTXO can only be spent once on the blockchain, a second attempt would be invalid.
It is unlikely a miner would be fragmented, due to the existence of things like the Fibre network I linked to above. Miners are heavily incentivized to ensure they have good connectivity to the network. Anything less than that means they could lose money by mining on the wrong chain.
So, I hope you can see that if a situation arose in which the network became fragmented, then it could be possible to get a double spent tx into the fragmented node's mempools undetected. However getting the doublespent tx confirmed is unlikely, due to good miner connectivity (very low chance of miner fragmentation). So as long as users wait for transaction confirmation (ie not a 0-conf tx), they will be at little risk of being double spent against. Usually 6 confirmations is the recommended waiting period for high value transaction.