Sadly, doesn't work. Please see attached screenshot.
This is a 100% clean VM which has only the bare minimum dependencies required to install Lazarus, as shown in the FPCUPDLX requirements text (plus GDB).
I also tested on an older Debian (non-12.6) and that failed too, but it does have all the latest updates, so not sure if that'd make a distinct test case, all things considered.
Can you repeat your test in a clean environment - if you don't believe in VMs, format a disposable device and run bare metal on it - it is very possible that missing dependencies could be the culprit (which is a primary advantage of VM testing).
Edit: My build environment is Debian 11.3 aarch64, and the file dialogs work there just fine.
Also: Even Lazarus can't show any file dialogs on Debian 12.x, for example.