It seems to me that when the 'language' is set to one which typically uses a 'comma' then this overrides the 'region' setting. So for example if the language is French and the region is US, then the decimal separator is shown as a 'comma'. However if the language is one which typically uses a 'dot', then this does not override the region. So for example if the language is English and the region is France, then the decimal separator is still shown as a 'comma'.
If the language and region 'match', for example French and France, or English and US then the decimal separator is always as expected.
So while it seems fairly random there is a kind of pattern to it. In fact I have only seen the keyboard incorrectly show a 'comma', I have never seen it incorrectly show a 'dot'.