This method was added in KF 5.41 according to docs, so this can go into Plasma 5.12 which depends on 5.42 according to wiki
It's still a bit awkward that you get two "Pictures" results, one being the "Search for Pictures" and the other the "Pictures" folder but at least you can open both of them correctly now.
I'll see if I can maybe add the group name as subText so it looks like "Pictures (Search For)", but it might also add "Places: Pictures (Places)" which is a bit weird