From an EU country, about to graduate in Denmark currently in the USA
it is not a problem that you are in USA now to write your thesis. However for being eligible for unemployment benefits ("dagpenge"), you must have stayed in Denmark right before you started your master and again at latest 14 days (including weekends) after you end your master.
The 14 days after finishing master (approval of thesis/final grades) is also the latest you have to apply for membership in a danish A-kasse.
If you meet these requirements then you can get dagpenge from one 1 months after graduation. Because you have not been member of A-kasse for at least 1 year when you graduate, then you must accept 1 month quarantine.
In your situation, where you have less than 1 year to graduation, I would just recommend to wait to apply for A-kasse membership until you are back in Denmark.
If you have been living in USA (or outside Europe) before, then you must be aware of the residence requirement. If you apply for dagpenge in 2019, you must have stayed in Denmark for at least 5 out of the last 12 years. However as an EU-citizen you can also include years spent in other EU-countries.
You can read more about this residence requirement here.
Anders Weber, www.a-kasser.dk