Right now as example if you have some password saved for domains with subfolders as example it will give the first one that does the match. So as example:
What domain will match if I am on domain.tld/folder?test=123 to you?
The first one as starts with check just if starts with not what is the one that fulfil at best this starts with. Maybe order the domains starting with the one longest for check should achieve this need.