Cherry pick changes from 3536318 to branch 1.2.x and 1.3.x
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3556007. -->
Reported by: [a.dmitriiev](https://www.drupal.org/user/3235287)
Related to !208
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The changes done in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/ai_agents/issues/3536318" title="Status: Closed (fixed)">#3536318: \r\n on the config form causes the property_restrictions to not be followed</a></span> stayed in 1.1.x branch and were never transferred to 1.2.x nor 1.3.x</p>
> Related issue: [Issue #3536318](https://www.drupal.org/node/3536318)
issue