I don't know. Says here that the UL (Tolerable Upper Intake Limit) for magnesium is 350 mgs. from supplements:Most people are magnesium deficient as it's difficult to get the required 400mg a day through diet only. It is a very important mineral in maintaining heart rhythm. Many people like myself who have Afib use magnesium supplements to help control NSR. Upon the advice of my cardiologist I take 400mg twice daily as a supplement. Much of that magnesium just gets passed through the bowels which is why you need to take mote than the 400 recommended. That in addition to what you get in diet and you're probably close to the 400mg needed daily.
https://www.hsph.harvard.edu/nutritionsource/magnesium/#:~:text=RDA: The Recommended Dietary Allowance,lactation, 310-320 mg.
Perhaps in your circumstances a higher dose may be indicated because of your AFib. Just curious, is your diet high in magnesium-rich whole foods?