Create new instances with every call of a Symfony service

Code
<?php

use Symfony\Component\DependencyInjection\ContainerInterface;
use 
Symfony\Component\DependencyInjection\ContainerBuilder;
use 
Symfony\Component\DependencyInjection\Definition;
use 
Symfony\Component\DependencyInjection\Reference;

class 
Foo
{
}

class 
Bar
{
}

$fooDefinition = new Definition('Foo');
// In 2.X it was setScope() set to prototype
$fooDefinition->setShared(false);
$fooDefinition->setPublic(true);

$barDefinition = new Definition('Bar');
$barDefinition->setPublic(true);

// set definitions in container builder
$containerBuilder = new ContainerBuilder();
$containerBuilder->setDefinition('foo'$fooDefinition);
$containerBuilder->setDefinition('bar'$barDefinition);

// calling bar service
$bar1 $containerBuilder->get('bar');
$bar2 $containerBuilder->get('bar');
dump($bar1 === $bar2);

// calling foo service
$foo1 $containerBuilder->get('foo');
$foo2 $containerBuilder->get('foo');
dump($foo1 === $foo2);
Result
^ true

^ false
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8