With the help of Leviton Tech Support I was able to resolve this issue
Well, I fixed it! I sent a note to Leviton Tech support asking them why on my app it was not showing the matter code. The answer? Firmware was 1.6 instead of 2.5 These switches were brand new out of the box and yet the firmware was obsolete over two years ago. The app also has a funky way it works. It has an update function but all that does is go out and tag the devices that are out of date. You have to exit the app and then go back in and call up each device to select updating of that device. Of course it has to have a network connection to do that. So the result was you have to use the app to join it to the network and then use the network to get the update but you have to force each one individually. Once I did that the matter code showed up which I could then save on phone and print and then I was able to join it to Home Assistant and to Apple Home. They say that it can be tied to up to 5 controllers at a time. I would ask your advice if this is a good idea or not. Right now I have three of them tied to HA Homekit and the App and they all work and can be controlled on each app. I THOUGHT that if I added it to HA that it would come across the Homekit bridge integration and show up in apple. It would seem that if that would work it would be better than adding them to both. DO you have to do something to the bridge to get it to send across new devices that have been added to HA?
Leviton D215S switches
This procedure is for getting a Leviton switch connected via matter over wifi to Apple home and to Home Assistant as well as the Leviton app all simultaneously
It is not necessary to pull out the switch from the wall or remove the cover. If it is in pairing mode the app will find it via Blue Tooth
The first step is to make sure that the Leviton switch is on current firmware
Reset the switch to default by holding it on for at least 10 seconds until the light flashes amber and red
Make sure your phone is on a network that is broadcasting on 2.4 ghz and make sure that IPv6 is enabled
Using the Leviton app bring it near the switch and adopt the switch into the Leviton app. Give it a new name and room (create the room if not already there)
Once adopted use the leviton app to update the firmware to the latest version I had brand new off the shelf switches and they had two year old firmware. If your going to do matter over wifi the version has to be at least 2.??
Once updated the app will now show the matter code for the device. Save a screenshot to your phone, this captures the matter code and the name that it was given. Print this out so that it can be used to scan for adding the switch to other controllers.
Because of the reset if the device was in apple home it will be gone.
To add it back into apple home once again hold the switch in the on position but stop holding it as soon as it turns amber/red. If you hold it longer it will reset the switch and will not longer be on the wifi or tied to the Leviton app
The light will quickly change from amber to flashing green. At this point it still has the wifi but is in pairing mode.
Now add the device to apple home or to Home Assistant. For apple you can scan the QR code and it will adopt it into the Apple Home (I think that you have to have an apple TV or a Homepod on the network to provide the thread protocol long enough to join it, I am not positive of this but I had one on the network and this worked.
After it is adopted do the same procedure again putting it into pairing mode with the 7 second on press and add it to Home Assistant. Use the choice of the device being already adopted (not new) and then either scan the code or type it in. Side benefit of this is that you will have all the codes printed out and saved to your phone for future changes.