Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
I've run into the same issue before, when using a complex modular structure.
I've checked the bicep repo on GitHub, and i can't see it as an outstanding issue.
If you have a repro you can share on the repo, i'd encourage you to raise the issue. https://github.com/Azure/bicep/issues