When Yaakov is approached by Rivka he demurs "ulie yemusheini avi" [27:12]
When Yoseph is propositioned by Mrs. Potiphar he refuses saying "v'hatati Leilokim" [Vayeishev 39:9]
Below are THREE approaches - pick your favourite Parshanut Preference
Yaakov was no tsaddiq here. He is only genuine concern is "Getting Caught
Yosef OTOH IS a tsaddiq here. His concern is based upon "Yir'at Elokim".
Yaakov - same as #1
Yoseph is a "tartuffe" he was either repelled by Mrs. Potiphar or -like Yaakov - by the spectre of "getting caught". His use of Elokim was merely an insincere excuse that "sounded right to him"
3. Dan l'Kaf Z'chut
Yaakov really was repelled by the idea of cheating. He demurred by using an excuse that he figured that Rivkah "would buy into." But in his gut he just didn't wish to go along.
Yosef same as #1
#1 the straight shooter is the most literal
#2 and #3 seem to reflect the Parshan's Preferences more than the text speaking for itself.
Then again, one may see the Torah as excoriating Yaakov and maybe his son Yoseph by extension.[#2]
Alternatively, the Torah seems generally to presume good things about both Yaakov and Yoseph [at least as he matured] , so why not apply it to the "doubtful cases" too?
Pick your preferred approach.