My ex wife files my son as a resident and i file him as a dependent. every year i file i have issues . once again its rejecting my claim

My ex wife files our son as a resident and per court orders i can file hime as a dependent. Every year I have issues with this , now once again my claim gets rejected