I have the same issue as you guys. My son has been playing Apex for months with no issues and now he gets "Invalid Account" when trying to run the game on XBox.
I have checked my EA account and it does not have my XBox account listed as a linked account.
I contacted EA support and they say that my XBox account is linked to an EA account but will not tell me which one. The guys on the support chat told me to fill in a recovery form, which I did, but it has been rejected twice with no feedback as to why.
They also sent a recovery code to the email address of the EA account associated with my XBox account, but obviously I did not receive that as it's not my account!
Whatever I say, they just tell me to submit the recovery form, but that is only for recovering an EA account.
My issue is that the XBox account is somehow linked with the wrong EA account. I just can't seem to make them understand that.