Don’t commit the crime...if you can’t deal with the consequences.
Your involvement in a crime is not determined by the police. That is for a judge to decide. Being innocent and arrested is not that uncommon. Don’t behave in a way that finds you guilty of failure to comply or resisting.