MS made the decision some years back to support the perpetual license versions of Office for only three major Mac OS releases. For Office 2019, that means Catalina, Big Sur and Monterey. If you don't include Catalina, since that came out the same year as Office 2019, then it would be Big Sur, Monterey and Ventura. That's why you can't activate it on your new M4 laptop.
But then it gets kind of messy. As you of course know, 2019 is running under Sonoma on your Intel based Mac, even though it's past the three year support period. That's because it's already activated for that Mac, and most importantly, the file(s) Office uses to check and see if the suite has been activated are on the Mac itself. As long as it can find those files, it will keep running. If there were any, it would refuse to install any further updates for Office 2019. But MS doesn't even list updates for the 2019 versions anymore.
You really have only one choice to avoid the subscription based 365 on the new Mac, and that's to purchase the latest perpetual license, Microsoft 2024, for the new Mac.
The Group Containers folder in your user account (~/Library/Group Containers) you restored to the new Mac do have the activation files in them. This is what Office looks for when you launch an app to see if it's been activated or not. But they're not just simple yes/no files. They hold identifying data of the hardware it was activated under, and they of course do not match the new Mac.
Assuming if you purchase Microsoft 2024 with the standard 5 user license, you'll be able to install it on both the older and new Mac as its three year support span is Sequoia, Sonoma and Ventura. Which is nonsensical, but that's what MS is saying now, despite the fact the 2024 version didn't arrive until macOS Sonoma was the current OS. So it should really cover Sonoma, Sequoia and the upcoming Tahoe.