Zend certified PHP/Magento developer

Session parameter set in backend observer not persisting after upgrade to 2.4.3

We have a backend observer that sets a session variable after a shipment is created (sales_order_shipment_save_commit_after).

It’s been working for over 2 years, but after the latest upgrade to 2.4.3-p1 the session parameter is not being updated. The issue is also present if we use the raw $_SESSION variable instead of Magento’s preferred mechanism. It’s as if the session has already been closed by the time the observer is executed.

For completeness, here’s the code. It’s nothing complicated.

<?php

  namespace [CompanyName][ModuleName]Observer;
  use MagentoFrameworkEventObserverInterface;

  class SaveShipmentAfter implements ObserverInterface {

    private $_backendSession;

    public function __construct(
      MagentoBackendModelSession $backendSession
    ) {
      $this->_backendSession = $backendSession;
    }

    public function execute(MagentoFrameworkEventObserver $observer) {
      $shipmentId = $observer->getShipment()->getId();
      $this->_backendSession->setData('shipment_created_id', $shipmentId);
    }
  }

My question is – should sessions not be used this way in observers (and Magento is finally enforcing that), is it a bug in the newest release, or is there a new way to utilise sessions?