TLDR: The previous answers seem correct, but are worded in a way that's misleading. Both services charge based on usage, but Google has a level which lets you scale usage down to 0 and Microsoft Azure doesn't. This makes Google MUCH cheaper for apps with intermittent usage (though scaling to 0 can introduce a startup delay). Apps that have a minimum scale (i.e. must keep instances running constantly) would be much more comparable between services.
Long version: As of mid-2021, the Azure pricing is not comparable to Google for intermittent usage. You are indeed charged only for your usage in both cases, but Google has a tier which allows the app to turn off, whereas on any non-dev/testing tier Azure lets you scale down to only 1. The Microsoft sales rep pointed me to this page, with this FAQ question at the bottom:
Question: Am I charged for apps while they are in stopped state?
Microsoft Answer: Yes. Rates listed apply to apps in stopped state. Please delete apps that are not in use or update tier to Free to avoid charges.
This means you get charged for every hour of the day even if you manually stop your apps. i.e. if they're not deleted you're getting charged.
By comparison, Google notes:
When an application is not being used at all, App Engine turns off its associated dynamic instances, but readily reloads them as soon as they are needed. Reloading instances can result in loading requests and additional latency for users.
and the pricing page explains about instance hours (the unit for which you are charged):
Accrual of instance hours begins when an instance starts and ends as described below, depending on the type of scaling you specify for the instance:
Basic or automatic scaling: accrual ends fifteen minutes after an instance finishes processing its last request.
Manual scaling: accrual ends fifteen minutes after an instance shuts down.
Scaling to 0/off seems to be available only for the Basic scaling type in App Engine though; Automatic scaling is more comparable to Azure since Google notes:
An instance of an auto-scaled service is always running.