It does seem difficult to convince anyone that class-clown behavior can be an anxiety symptom, but yeah.

Is your DS' verbal ability a strength for him? For mine, high verbal ability + poor social insight = making jokes. I think it's his social currency, because he truly is very funny.

Does your DS struggle with social skills, along with social anxiety? It might be helpful to get some help in that area (with counseling, etc.) I'm not sure you'll ever convince the principal to see this for what it is--but it might help if DS felt more competent making social connections through some more positive behaviors.