Hello @Krissy Huxley , thank you for reaching out. You can only get logs for 30 days as the retention period for these logs by AAD is for 30 days. After 30 days, all signing and audit logs are flushed out. You are not able to view the previous logs even after you upgraded to the AAD P2 license is because your old logs (older than 30 days), while you were in the free license, have already got wiped out. The only available logs available now are of the past 7 days and these logs would be there for the next 23 days and then these would also get flushed out. After the upgrade to P1 or P2 license, it usually takes 48 to 72 hrs for the logs to re-populate (if not already removed from our backend)
You can find the same query being answered here: https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-reports-data-retention#how-soon-can-i-see-activities-data-after-getting-a-premium-license
If logs are permanently deleted unfortunately there is no way to recover them. But henceforth if you would like to keep monitoring your signin-activity or audit-logs, I would recommend you to please backup your signin and audit logs periodically, by manual or automated means, and store it with yourself.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.