Can AI detectors tell the difference between ESL writing and AI writing? Asking because my prof flagged my essay

this is stressing me out and i need to understand what actually happened

i’m an international student and english is my second language. i write carefully because i have to, i can’t rely on idioms or casual phrasing the way native speakers can. my writing tends to be formal and structured because that’s how i learned academic english.

my professor flagged my last essay for AI. i did not use AI to write it. i used grammarly for corrections and looked up a few words in a dictionary app. that’s it.

i’ve read that ESL writing can get flagged because it has similar patterns to AI output. is that accurate? is there any way to demonstrate that the flagged essay is actually mine?