Accused of copying code for autograded assignment
Honestly, your best course of action is to apologize to the professor, admitting your fault and vowing to do better in the future. You can beg weakness and panic, but don't try to justify it to them or others. Such an apology is best made in person, possibly impossible now, and embarrassing, but it adds an extra element that you understand the error.
If you learn from your mistakes you are becoming a better person. But if you refuse to learn, others will cease to respect you, with long term consequences.
But by stepping forward with an apology you might assure the professor that you understand the issues, in which case they won't feel quite the need to watch your every future step with a jaundiced eye.
You screwed up. Own it. People aren't perfect. We can learn, however.