Hide ion footer when keyboard opens Ionic 5

I’m using Ionic 5 and I need help on hiding the footer when the keyboard opens. I’m using the following:

ionViewWillEnter() {
        this.keyboard.onKeyboardWillShow().subscribe(() => {
            this.isKeyboardHide = false;
        this.keyboard.onKeyboardWillHide().subscribe(() => {
            this.isKeyboardHide = true;

and HTML:

<ion-footer [class.ion-hide]="!isKeyboardHide" class="ion-no-border">

It actually does hide when clicking on an Input, but if I close the keyboard, the footer doesn’t come back, and if I click on a input and the keyboard opens again, the footer appears above the keyboard and never hide anymore. Can someone help me please?