Usage patterns
〈人〉を悪者にするto make someone out to be the bad guy
He made his colleague out to be the bad guy to hide his own mistake.
悪者になるto end up being seen as the villain
When I told the truth, I ended up being seen as the bad guy.
〈人〉を悪者扱いするto treat someone as if they were the villain
I think it's unfair that everyone treats him like the villain.