Does IRS tax law trump an old divorce decree when claiming dependents

My ex and I agreed to alternate claiming our son in our divorce in 2010. Dad has odd years so 2019 is his to claim our son (remember this). He was actively exercising his visitation, etc., paying his support on time always, excellent dad. Then son diagnosed with Autism, which required me to have to take fmla in 2013 & I didn't work until late 2018. Only income coming in was his support & eventually SSI after my nest egg was gone but they're exempt so never filed taxes thus didn't claim child on even years. 2015 dad remarried and stopped his visitation when he moved about 8 states away. They stayed in touch at first, but calls are down to 1/mon maybe & a couple weeks a year in the summer. I just went back to work in late 2018, so 2019 is my 1st return since 2012. It's electronic now, yay, but according to your wizard I qualify to claim our son & dad doesn't since he moved & I have him almost 365. So I added him (I assumed dad already knew he couldn't claim him any longer once he moved & if not a tax professional does his taxes so they had to tell him). eFiled and it was rejected? Now what do we do? I qualify by irs tax law, but our decree was never changed & says he can since I didn't this know until 2 days ago. Does IRS tax law trump old agreements? Btw, we also never had that 8### Form done or signed. So how has dad been able to claim him in the 1st place & all these years, especially bc when I get SSI (that is funded by IRS tax $) for our son as his custodial parent AND he is in the NJ registrar for disabled children where all of our info (SSN, address in NJ, etc.) had to be provided and dad lives in Fl? 

I also have a smaller question about the stimulus now too, since I didn't file any return in 2018, won't get my 2019 return in until we know who can claim our son & if dad does have to amend his it will be longer PLUS I also get SSI on my son's behalf (technically it's not my SSI benefit it's in his SSN, but payable to me & deposited in my bank account). So am I eligible for the stimulus due to SSI benefits & get paid soon from that, if so do I have to claim my son for the addes $500 stimulus as a non tax filer, or bc it's a child's SSI benefit the $500 is automatic OR bc it is his SSI & not mine, do I have to file my 2019 taxes before I get the stimulus? I'm so lost.