Checking if a transaction is still open in PDO

Code
<?php

$pdo 
= new PDO('mysql:dbname=boo;host=127.0.0.1');

$pdo->beginTransaction();

dump($pdo->inTransaction());

// error happens and rollback is invoked
$pdo->rollBack();

dump($pdo->inTransaction());
Result
^ true

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