Google domains' DNS doesn't support ALIAS/ANAME record to apex domain (also naked domain), but also support domain forwarding to subdomain from apex domain.
Let's set it up.
In this example, we use the following records as a sample:
CDN Raw Hostname:
1. log in to Google Domains Control Panel
2. Navigate to My domains
3. Click the [Manage] button on your domain
4. Navigate to "Website" menu
5. Click [Set up forwarding]
6. Setting up like the below.
a) Input the naked domain name to the "Forward from" field
b) Input the URL of the www-prefixed domain name.
c) Click the [Forward] button to save changes
7. Domain forwarding has been added.
Let's access your naked domain with your web browser and domain forwarding correctly.
Here is a sample command with cURL and its result.
curl --head http://example.com
HTTP/1.1 301 Moved Permanently
Date: Wed, 19 Jun 2019 09:51:10 GMT
Content-Type: text/html; charset=UTF-8