There is this thread that extensively describes ways to add Matter devices.
Using HA inside a VM devices cannot be added directly because the host is connected through WiFi, (client) WiFi cannot be bridged, and commissioning (using non-routable packets) fails (completely silently, no error given).
Using HA on a hardware device the device is in the correct network but it has no Bluetooth, and even if it had it is not in range. Then a companion application needs to be used.
On an old phone with half-broken ancient firmware the Play store does not work for whatever reason. Freedroid has HA application. It detects the HA in the network correctly. However, Freedroid only has the ‘Lite’ application, and that cannot add devices.
So is there any realistic way to add Matter devices?
To add insult to an injury an ‘offline’ protocol needs the Play store. That does not sound offline at all.
And finally here there is guide for using the commissioning functionality directly in the Matter server.
With the HA connected to an Ethernet port on WiFi router that is directly bridged to the WiFi network this works.
A Bluetooth adapter is needed on the HA server. It needs to be configured and then disabled (not sure simply ignoring it would work), and then it can be configured in the Matter server. Then when the Matter device is brought close to the HA hardware it can be connected.
On the Matter device there is a QR code which has a numeric code below which is different from the content of the QR code. Using the 11 digit code without the dashes the commissioning works.