Brackets misinterpreted on Danish keyboard

I use a Danish Apple keyboard and want to input a ] in the metric pop-over, to be able to write: [3+3+4]/8, but Dorico insist to interpret the last bracket
( ] ) as a {. It’s strange because the first ([) is fine, and the Apple keyboard viewer also “say” it’s a ].

What can be the reason and is there a solution?

I tried setting my Mac to use the Danish keyboard layout, and found that [ is Alt+8 and ] is Alt+9. Provided I type those keys as described here, the expected characters appear with no problems.