Looks like we are experiencing the same issue. We are using Drupal 9.5.8 with search_api 8.x-1.29. When immediate indexing is enabled and we attempt to save a node we get the following error message:
RuntimeException while trying to render item entity:node/475:en with view mode full for search index X: Failed to start the session because headers have already been sent by "/var/www/vendor/symfony/http-foundation/Response.php" at line 368. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 152 of /var/www/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).
Indexing into Solr fails completely as far as I can see. I suspect there is an issue with the markup in our layout builder block, a hook or twig file, etc but it has been difficult to track down. If I change the view mode to anything other than full it indexes into Solr as expected. Obviously the page is broken without the proper markup in place but at least we know the issue is indeed related to the full mode while using layout builder plus immediate indexing.
It is a pretty significant issue for our publishing group but we are currently working around it by disabling "Index items immediately" and using cron to trigger the indexing.