500 error when creating a new contact (interface and API)

My Mautic version is: 4.0.0-rc
My PHP version is: 7.4.22
My Database type and version is: 10.6.4-MariaDB-1:10.6.4+maria~hirsute

Your problem
My problem is:
I cannot create a new contact. In the interface I am getting a 500 error if I try to create a contact with just name and email.

In the API I get the issue also when using test data

  $this->testPayload = [
            'firstname' => 'John',
            'lastname'  => 'APIDoe',
            'address2'  => 'Sam & Sons',
            'email'     => 'test@mautic.api',
            'owner'     => 1,
            'points'    => 3,
            'tags'      => [
                'APItag1',
                'APItag2',
            ],
        ];

Also I encounter this issue with the API. I am getting 500 error.

These errors are showing in the log (I get same error for API request and for creating a contact in the interface):

When I add a tags field:

[2021-08-26 07:02:47] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\TransformationFailedException: "Unable to transform value for property path "tags": Expected a Doctrine\Common\Collections\Collection object." at /var/www/vendor/symfony/form/Form.php line 1110 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\TransformationFailedException(code: 0): Unable to transform value for property path \"tags\": Expected a Doctrine\\Common\\Collections\\Collection object. at /var/www/vendor/symfony/form/Form.php:1110, Symfony\\Component\\Form\\Exception\\TransformationFailedException(code: 0): Expected a Doctrine\\Common\\Collections\\Collection object. at /var/www/vendor/symfony/doctrine-bridge/Form/DataTransformer/CollectionToArrayTransformer.php:44)"} []

When I do not mention any tags :
[2021-08-26 06:52:12] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Types\ConversionException: "Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. Serialized Array: a:1:{s:6:"fields";a:1:{s:4:"tags";a:2:{i:0;s:76:"Doctrine\Common\Collections\ArrayCollection@0000000016b5c52b00000000014f4997";i:1;O:43:"Doctrine\Common\Collections\ArrayCollection":1:{s:53:"__NULL_BYTE__Doctrine\Common\Collections\ArrayCollection__NULL_BYTE__elements";a:0:{}}}}}" at /var/www/app/bundles/CoreBundle/Doctrine/Type/ArrayType.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Serialized array includes null-byte. This cannot be saved as a text. Please check if you not provided object with protected or private members. Serialized Array: a:1:{s:6:\"fields\";a:1:{s:4:\"tags\";a:2:{i:0;s:76:\"Doctrine\\Common\\Collections\\ArrayCollection@0000000016b5c52b00000000014f4997\";i:1;O:43:\"Doctrine\\Common\\Collections\\ArrayCollection\":1:{s:53:\"__NULL_BYTE__Doctrine\\Common\\Collections\\ArrayCollection__NULL_BYTE__elements\";a:0:{}}}}} at /var/www/app/bundles/CoreBundle/Doctrine/Type/ArrayType.php:46)"} []

Note:

When attempting to create a contact (with only email, for example) in the interface , apart from getting the 500 error, it creates the Contact but on the tags fields it has the following value Doctrine\Common\Collections\ArrayCollection@0000000037349d4a00000000145e85d4

Steps I have tried to fix the problem:

I have tried multiple fields combinations for fields with no success.