registerBackButtonAction not firing when use --prod

In my app i’ve tried to use the registerBackButtonAction, but when i build with --prod something strange happens.
If press the back button in the first page, the registerBackButtonAction is not fired. But if i navigate to another page, then the action start to work.
To test if is an error in my logic, i’ve changed the action to only show a log, but the log is never displayed if i don’t navigate to other page. Here’s the code:

platform.ready().then(() => {
this.platform.registerBackButtonAction(() => {
console.log(‘Backpressed’);
}, 1);

this.nav.setRoot('Home');

});

Ionic:

Ionic CLI : 5.2.3
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.3

Cordova:

Cordova CLI : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 9 other plugins)

Utility:

cordova-res : 0.14.0
native-run : 0.2.8

System:

Android SDK Tools : 26.1.1
NodeJS : v10.15.2
npm : 6.4.1
OS : Windows 10