For set mining to work, the size of the pre-flop raise is important. The raise must be small enough to justify calling with your pocket pair.
Generally, the flop should be at a reasonable price to minimise any risk. A larger raise significantly increases the risk and reduces the implied odds, which makes set mining less attractive.
Calculate the pot odds – the ratio of the cost of the call to the total pot size – to determine if the call is mathematically sound. If the raise is too large relative to the potential reward, it is best to fold.