This indeed seems to be a poorly designed workaround ;)
You might want to consider an alternative approach that involves sending logs via a forwarder and leveraging custom log collection - e.g. by using https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-ingestion-api-overview
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin