iPadOS’s Safari user agent identifies itself as macOS, that’s why. Prior to iPadOS it did contain the string iPad; that was removed. So it can’t tell if it’s an iPad or a Mac with a small vertical screen, although a human would consider the former more likely.
As far as my Chromium is concerned, it identifies as a...: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
The only thing it doesn't identify as is Internet Explorer.
(Yes it's an old version, no I will update when I feel like it. Shush.)
Don’t know about your particular problem, but I’m pretty sure it was largely a response to iPads being sent to mobile sites with horrible usability thanks to navigator.userAgent.match(/iPhone|iPad|iPod/) or the server-side equivalent. The problem was amplified by the release of the 12.9’’ iPad Pro, so self-identifying as a Mac made sense.
Well I’m glad Apple prioritizes us over you the. I don’t care that you want it a different way. Apple forcing the end of bad practices in this instance is a win.