as title says kdramas like flex x com or Japanese dramas

So a non-serious detective story with humour and chemistry between the leads?

Korean dramas:
You are all surrounded 
Good Job
Hello Monster
Doubtful Victory
Awaken - this is more serious but the ML is very similar in terms of behaviour to the ML from Flex Cop

For Japanese dramas:
Goritekini Arienai: Tantei Kamizuru Ryoko no Kaimei
Galileo - this one has multiple sequels (dramas and movies) which are all great, though I do think s1 and Midsummer movie are the best. The ML is a university professor, so from his persona a bit more different to the ML from Flex Cop. Plus this drama has some very well developed cases. However it fits with Flex cop due to the ML not being police, the chemistry between the leads and the humour.

1. Oretachi wa Abunakunai ~ Cool ni Saboru Keijitachi - a very funny Japanese cop drama.

2. Bitter Blood - ML is a cop, it is rather funny and I also like him in Koi wa Tsuzuku yo Doko Made mo

1. Signal
2. Voice
3. Life on Mars
4. Tunnel

The Fiery Priest is a title I strongly recommend, I binged it not long ago and it gives me a similar vibe