See (this topic) for background and current short-term solution.
With Classic Design Experience, you can enable Recording and select (small) menu elements (File > Save as…), while Modern Design Experience (MDE) by default will select the whole menu bar as one element. In order to select File in MDE, you need to add each activity manually without using App/Web Recorder, as you then will be given an option to change the UI Framework to UIA.
Note that this is the case with certain (modern) applications, such as notepad application in Windows 11.
My idea is that a toggle to default to “UI Framework: UIA” in Modern Design Experience when using App/Web Recorder would be an improvement.