I've had that happen in OTB but you should always play the best move you can find. Assuming your opponent won't find the right continuation, isn't normally a good idea. Now, if your move is still good, just not objectively best, and there is only one good reply, all other moves are losing, then it might be worth making the move anyway.
That comes down to evaluating if the move you want to play still has promise even if they find the line you found. What I hate is when I see a move, think I find a satisfactory defense on my opponent's part, do something else and find in post-game analysis that was the best move
Recently I have been facing this very strange problem. During the game when calculating, I find that some moves which look interesting does not give me a great position because there are some good responses for my opponent in the variations and so I don't play that move but instead play some other alternative move. After the game during post-mortems, my opponents ask why I did not play that particular move. When I show how that move does not lead to anything due to the variation I had calculated, they say that they had not seen that idea or they say that they would not have played that move which I had seen. This is happening fairly regularly which is annoying to me because if I had played the move which I had rejected, then I could have won my games easily because my opponents would not have found the right responses. Has anybody experienced something similar? If yes, then how have you overcome this problem?