Mobile phone number formatting mask

Folks, I know extensions make our lives a lot easier, but I wouldn’t want to use this one. In Brazil, mobile numbers are represented by the state area code followed by the number itself, separated by a hyphen. Example: (31) 9 9999-0000.
I am using this formatting here:


It works perfectly in the Companion, but it doesn’t format correctly when generating the APK.
Is there something wrong with this structure?