Why is this an issue?

According to the best practices defined by Azure, a consistent order of properties in a templates is recommended. This makes it easier to read and understand the template.

Not following this convention has no technical impact, but will reduce the template’s readability because most developers are used to the standard order.

How to fix it in ARM Templates

Recommended order of properties:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/...",
  "contentVersion": "1.0.0.0",
  "metadata": {},
  "apiProfile": "...",
  "parameters": {},
  "functions": {},
  "variables": {},
  "resources": [],
  "outputs": {}
}

How to fix it in Bicep

Recommended order of elements:

targetScope ...
metadata ...
param ...
func ...
var ...
resource ... // (existing resources collected together)
resource ... // (new resources)
module ...
output ...

Resources

Documentation