KFileWidget is not as good at selecting directories as KDirSelectDialog from plasma-integration. On top of that, directory selection appears to be entirely broken currently.
Use KDirSelectDialog through QFileDialog if possible.
It appears like chromium switched to using the portal API by default now, and a downstream user found that it's no longer possible to select directories: https://bugzilla.opensuse.org/show_bug.cgi?id=1194788
Note: I didn't test whether this works with chromium so far, I'm asking the reporter for some feedback.
Downstream reporter reported success with chromium.
An RFC fix for KFileWidget is pending: frameworks/kio!713