Tor is only as anonymous as the exit nodes and traffic allows. If you’re sending already encrypted traffic over Tor (such as by using a VPN), then Tor is anonymous and will make it even harder for someone to trace your traffic. That said, a malicious exit node can see any unencrypted traffic you send, and even alter it to include malware.