AirPlay can stream lossless files up to 16-bit / 44.1 kHz for CD-quality playback. It's not Hi-Res..
airplay2 apparently can do 24-bit / 48 max. But I have come across a miniscule audio content out there with this sampling rate. Even my own music collection (around 1.8 Tb), there is hardly any thing with 48kHz sampling rate. So practically airplay is good only for cd quality but not Hi-Res. Having said that, I think apple's priority is spatial audio with with dolby atmos and not hi-res or being able to play bit-perfect.
When it comes to bit perfect it becomes worse. Even though apple music will show that it is playing the music lossless, your dac may not be receiving it lossless. Apple has just got into the game. It will be a long road ahead to get their act together as far as Hi-Res is concerned.
The bottom line is that AirPlay 2 isn't currently receiving bit perfect lossless audio unless the system-wide output is set to an AirPlay 2 device, otherwise it's likely converting it to AAC at 256 kbps. Strangely, the Music app on macOS says it's streaming lossless audio when sending via AirPlay 2 even if it is lossy because of the output selection only being done in the Music app, but the audio isn't bit perfect this way. The same app when sending via AirPlay 1, will display the lossless logo only if the system-wide audio device is set to the AirPlay 1 device.
As of now the only devices that can play well are the ipads and iphones. But it is a PITA reserving an IOS device just to play apple music and nothing else. Apple's other devices macbooks, macminis suck at playing hires. The music app is shoddy. Few months back, they just added Hi-Res in the preferences for playback (see attached image below).

But the music app doesn't change the sampling rate automatically. So you are stuck at one sampling rate throughout the playback. The only way you can change the sampling rate is to use the 'Audio Midi' setup application on macbook, mac minis. Now when you connect an external DAC, apple does it quite amateurly. There are two problems
1. apple hasn't yet learned how to detect external dacs properly. For some of my dacs it does it ok. For some, like In this case below my Xonar dac is shown as speakers. Linux and even the shoddy windows recognize DAC properly and will show the dac name. Linux properly shows my dac as Essence One.
2. All you can do is to set a fixed sampling rate. In my case i have set it to 192 kHz so that at least my hi-res dsd and hi-res flac music plays bit-perfect. On Linux, all music applications automatically change the sampling rate as per the source. Itunes has been there since 2001. 21 years later apple still hasn't learned how to automatically set the sampling rate.

Other users have also found this out. This is from a user who has done extensive testing of airplay and found out that even though the music app will show the playback as lossless when in reality it is not.
There you have the complete soup sandwich that is Apple Music lossless streaming over AirPlay versions 1 and 2.
I'd like to note that some people have said my bit perfect testing isn't really that big of a deal because Apple is streaming lossless audio and they don't care if it isn't bit perfect because it's better than the lossy stuff. After doing my research, I can tell you the "lossless" may be the exact same thing as the lossy, so people really should care about bit perfect playback. If we don't know where the digital signal processing is happening, we don't know that it's even lossless.
Earlier this month I dug into Apple Music's Lossless and Hi-Res offerings, running several bit perfect rests on the audio output of my Macs and iOS devices. The results were less than stellar (link). This week I dug into Apple Music lossless over AirPlay. One would think that the results would be...
audiophilestyle.com
The biggest surprise to me is that even when using the Apple's Camera Connection Kit (CCK) the playback is not lossless.
I know it's not AirPlay-related: don't you find the lossless streaming from iOS/iPadOS through USB CCK not being bit perfect particularly disappointing?