Node YAML files not creating or updating

When I create a new host and register it, the corresponding Node YAML file in “/opt/puppetlabs/server/data/puppetserver/yaml/foreman/” is not created. The YAML file for the puppet server was created there at the time of installation.
Puppet throws an error that the node could not be found
However, I can see the node definition YAML at the following link:

I manually created the “” file at that location and changed the owner/group to “puppet:puppet”. I copied the yaml I got from the URL above. After that the puppet error went away.

However, after adding classes to the corresponding host, the Node YAML file does not update. If I navigate to the URL “” I can see the correct YAML. However the file “/opt/puppetlabs/server/data/puppetserver/yaml/foreman/” is not changed. Running “/etc/puppetlabs/puppet/node.rb” still shows the old definition. So it is likely reading this from the YAML file above.

I verified “vardir” in “/etc/puppetlabs/puppet/puppet.conf” and “puppetdir” in “/etc/puppetlabs/puppet/foreman.yaml”. Both variables have the same value: “/opt/puppetlabs/server/data/puppetserver”
I verifed that the user “puppet” has read/write permissions on the YAML file.

Expected outcome:
Foreman automatically creates and updates node.yaml files in “/opt/puppetlabs/server/data/puppetserver/yaml/foreman”

Foreman and Proxy versions:
Foreman 3.2.1
Foreman Proxy 3.2.1

Foreman and Proxy plugin versions:
foreman-tasks 6.0.1
foreman_puppet 3.06
foreman_remote_execution 6.0.0

Distribution and version:
Ubuntu 20.04

Other relevant data: