I'll try to explain why the medieval societies had relatively poor law enforcement and hope that this helps you tweak your setting to avoid the reasons, at least locally in a single city.
Basically, professional dedicated law enforcement requires the professional can serve enough people who need his service and can pay (usually indirectly) his wages. The middle ages had relatively low population density, crappy transportation system, and huge wealth inequality that guaranteed most people could not really pay for anything.
As such it was necessary for most law enforcement to be done by people who had other sources of income. Gradually this evolved into a system where people could become bit more professional by getting their money directly in form of fines, other payments and outright bribes. And finally governments became rich enough to start paying wages.
The good news that this is about economics not about some obscure level of technology issue. So there is no reason why a rich mercantile city with high enough population could not have professional law enforcement. I think London actually was one of the first cities to go pro. Only real technology requirement is transportation, the watchmen must be able to reach all parts of their jurisdiction in reasonable time. But many ancient cities were properly planned grid plans, roads, and even water and waste management. So there is no real reason your city can't have roads good enough.
Social inequality is a harder issue. In most medieval societies there would be no real incentive to provide professional law enforcement to the poor. And not enough rich to need any. So you need to give the government some reason to protect the poor that justifies the cost. Historically this happened with industrialization, but that does not fit your scenario.
You already need the city to be a commercial center to have the money to justify professionals. You can upgrade that by making the city the center of craftsmen. The kingdom might have deliberately concentrated craftsmen into the capital, many ancient civilizations actually did relocate the artisans of the conquered to build monuments for themselves. Your kingdom might use this system and the crafts guilds of the capital might have a monopoly in making some goods. This would create a concentration of trained professionals worth protecting. And in need of being watched for republican tendencies.
The city could be a religious center. King David IIRC concentrated almost all worship to Jerusalem to increase his control of the tribes of Israel. Teotihuacan was a huge religious center with approximately correct level of technology. Your kingdom might have concentrated religion in a similar way and made the capital the place of pilgrimage everyone wants to visit. This would create a large transient population that needs professionals to control and brings in enough money to be worth it since people would save money for years to make the trip and buy relics and talismans and such.
The city could also be a center of education. Institutions like the Museion of Alexandria or the University of Paris had huge effects on their cities and brought in people from wide and far beyond the borders of the kingdom. All those foreigners need to be watched and since education is not free, they'd also be worth hiring people for the purpose.
Even if the kingdom does not have a standing professional army it probably has a standing navy to protect all the commerce and pilgrims. And if commerce and pilgrimage is concentrated on the capital, the navy would probably be based right there. Both off duty soldiers and ambitious admirals need someone to watch them and the expense is essentially an extra cost on having a navy.
The city would also be the center of royal bureaucracy and the royal court. Given the level of concentration I have already suggested I think we can assume much of the nobility will be forced to live in the city much of the time. They and their huge mass of servants will need to be protected while in the Kings city. And the King would prefer that to be mostly done by people people he pays and controls, not by the personal armsmen of the nobility. The expense would be part of the cost of not having the nobles rebel constantly and not an issue.
By assuming all that I think you could assume a single "golden city" with professional law enforcement, good roads, lots of money, where everybody who is worth something can be found. The rest of the kingdom? Would be handled as part time work by representatives of city councils and local nobility. But having a core of professional law enforcement in the capital would enable the king to send professionals to investigate anything worth the attention.
Note that if you concentrate all the power in the capital then the force guarding it has lots of power if corrupt. Think Praetorian Guard. The Praetorian Guard is also a good example of the evolution of such a professional force from the personal guard of the king. Just tweak the evolutionary path somewhere around where they start assassinating emperors. Later emperors had a closer personal guard hired from foreigners, presumably capable of protecting them from the larger guard force to some degree. So give your king a separate force of bodyguards that watches the watchers and is watched right back also... There should be lots of rivalry and suspicion in that relationship.