The lob is most useful when the opponents are tight to the net and you need to move them away from their attacking position. It gives you time to recover, move forward or change the direction of the rally.
It is less useful when the opponents are already deep and ready for an overhead because in that situation you may simply give them a comfortable attacking ball.
What to do
Before choosing the lob, read the opponents' court position. If both players are crowding the net and there is space behind them, the lob becomes a strong option.
If they are already backed up near the glass, consider another shot that keeps them under pressure rather than lifting the ball into their preferred overhead position.
Why it works
The important lesson is that the lob is a response to court position, not an automatic defensive shot.
Look at where the opponents are first. Their position tells you whether the space behind them is available.