«رُبَّمَا يَوَدُّ الَّذِينَ كَفَرُوا لَوْ كَانُوا مُسْلِمِينَ»
Those who disbelieved may wish that they had been Muslims.
Yawaddu is imperfect, while the scene concerns an intense future regret. The form helps bring that desire vividly before the hearer, potentially suggesting renewal of the feeling.
In law kanu muslimin, law also conveys wishing. Treating it as a rigid case of a past counterfactual with an ordinary conditional response would miss the optative force.