https://www.myjewishlearning.com/article/the-denial-of-free-will-in-hasidic-thought/
From the Baal‑Shem Tov…there is a parable of a person who decided
to test his wife, so he made himself appear to her as a sea captain, and
grabbed her and enticed her. But she refused, until he forced her to
agree to him. Afterwards, she came to him with a broken heart and
revealed the matter to him. Her husband then said to her, "It was I, and
you never committed adultery with another." Thus shall God clarify the
sins of Israel, that all was from God. And so I heard from our Master,
Teacher, and Rabbi, Blessed be his memory, from Izbica, the
interpretation of the verse, "You were rebellious with God (Deuteronomy 9:8),"
for it should have said, "against God." But the meaning is that God
will make it clear that when we were rebellious it was also with God,
and from Him it issued. (Pri Zaddiq, 4.236-237)