After migrating Foreman to 3.4.1 the facts are not being uploaded to the server anymore

When puppet agent is run on nodes, the facts are collected on the node, but they are not sent to the server. They do not appear in Foreman facts page. When running the puppet on a new node for the first time, the node registers on the Foreman, but no parameters are set - neither organization, nor location and of course also not any of the parameters that come to the froreman through the facts (i.e. operating system, model, …)

Expected outcome:
The facts from the node should be uploaded to the Foreman and should be visible in the Facts page on Foreman. Also, when the node auto registers after first run of the puppet agent on the node, all node parameters should be set.

Foreman and Proxy versions:
Foreman: 3.4.1,
Foreman-proxy: 3.4.1

Foreman and Proxy plugin versions:

Distribution and version:
Foreman server: Ubuntu 20.04.5 LTS
Node: Ubuntu 22.04.1 LTS

Other relevant data: