Specifically which board are you talking about actually? From what I saw, even the B660M-HDV which was so widely criticised ran an i5 12400 at full speed just fine. And that's for Intel, for AMD you can even run a 3900X on a B550M DS3H without throttling which is pretty crazy.
The issue is less pronounced on AMD systems from my observation. The issue with motherboard VRM and build quality tend to impact Intel systems more due to the higher power consumption.
I’ve not really tested budget Intel boards, such as the ASRock one that you mentioned. But in my opinion, if I don’t want to use it, neither do I want to peddle it to others. It is cheap, and that is the primary driver. But paying slightly more for a better board makes more sense to me.
https://www.techspot.com/review/2424-asrock-motherboard-fail/
While the review above did not touch on testing with an i5 12400, you need to be mindful that the temps (including the VRM) will affect how long or how high the CPU can boost. Most reviewers as I know tend to test systems in an environment that is cold, i.e. in the range of 20 to 25 degrees celcius, from what they shared. So if you factor Singapore weather in this context, then you need to be prepared that it may not go well.
Anyway, bottom line is I’ve not tested it myself, so I can’t confidently say that the i5 12400 will work nicely with really budget boards. It is possible because the 12400 is not known to be a power guzzler. So I may be wrong. But again, it is not something that I would recommend since I will not buy it.