If you give the second transaction a higher fee rate, the two transactions will be treated as one “package” by any reasonable transaction selection algorithm and will almost certainly be mined in the same block. However, there’s no way to actually prevent a miner to only mine the first transaction but not the second.











