True virtues make us more like God. False virtue makes us more like Satan. That is why Jesus said in the Sermon on the Mount, “If your virtue goes no deeper than that of the scribes and Pharisees, you will never enter into the kingdom of heaven.”
False prudence is often called “prudence of the flesh”. It makes us “wiser” in the ways of evil. True prudence is the virtue that shows us the best way to practice all the other virtues. So Joseph, when working in the house of Potiphar, had the prudence to run away from temptation. When it comes to rejecting temptation of adultery and promiscuity, this is the most prudent thing to do.
One of the saints advised, when faced with such temptations: “Don’t be such a ‘coward’ as to be ‘brave’. Flee!” Another author wisely wrote: “In cases of this kind, it is better to run away than engage in battle.” This is exactly what Joseph did and God rewarded him for his prudence.