Qt 5.15.2 item disappear when used in StackView

I have this QML files

//main.qml

import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.2

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Component {
        id: firstPage

        BasePage {
            bottomBar.rightButton.text: qsTr("Next")
            bottomBar.rightButton.visible: true
            bottomBar.visible: true

            Button {
                height: parent.height * 0.2
                width: parent.width * 0.3
                anchors.centerIn: parent
                text: "NEXT"
                onClicked: stackView.push(secondPage)
            }
        }
    }

    Component {
        id: secondPage

        BasePage {
            onBackKeyPressed: stackView.pop()
        }
    }

    StackView {
        id: stackView
        initialItem: firstPage
        anchors.fill: parent
    }
}

//BasePage.qml

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

Page {
    default property alias content: contentItem.data
    property alias bottomBar: bottomBar
    signal bottomBarLeftButtonClicked()
    signal bottomBarCentralButtonClicked()
    signal bottomBarRightButtonClicked()
    signal backKeyPressed()

    id: basePageItem
    focusPolicy: Qt.ClickFocus

    Keys.onReleased: {
        if(event.key !== Qt.Key_Back && event.key !== Qt.Key_Escape)
            return;

        backKeyPressed()
        event.accepted = true
    }

    Rectangle {
        id: background
        anchors.fill: parent

        ColumnLayout {
            id: basePage
            anchors.fill: parent
            spacing: 0

            Item {
                id: contentItem
                Layout.fillHeight: true
                Layout.fillWidth: true
            }

            BottomBar {
                id: bottomBar
                Layout.preferredHeight: parent.height * 0.1
                Layout.preferredWidth: parent.width
                visible: leftButton.visible || centralButton.visible || rightButton.visible
                onLeftButtonClicked: bottomBarLeftButtonClicked()
                onCentralButtonClicked: bottomBarCentralButtonClicked()
                onRightButtonClicked: bottomBarRightButtonClicked()
            }
        }
    }
}

//BottomBar.qml

import QtQuick 2.9
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3

Rectangle {
    property alias leftButton: leftButton
    property alias centralButton: centralButton
    property alias rightButton: rightButton

    signal leftButtonClicked()
    signal centralButtonClicked()
    signal rightButtonClicked()

    id: bottomBar
    color: "#fafafa"

    ColumnLayout {
        anchors.fill: parent
        spacing: 0

        LinearGradient {
            Layout.preferredHeight: parent.height * 0.1
            Layout.preferredWidth: parent.width
            gradient: Gradient {
                GradientStop { position: 0.0; color: "#fafafa" }
                GradientStop { position: 1.0; color: "#d7d7d7" }
            }
        }

        Item {
            Layout.preferredHeight: parent.height * 0.9
            Layout.preferredWidth: parent.width

            RowLayout {
                anchors.fill: parent
                spacing: width * 0.02

                Item {
                    Layout.preferredHeight: parent.height
                    Layout.preferredWidth: parent.width * 0.32
                    BottomBarItem {
                        id: leftButton
                        visible: false
                        anchors.fill: parent
                        onClicked: bottomBar.leftButtonClicked()
                    }
                }


                Item {
                    Layout.preferredHeight: parent.height
                    Layout.preferredWidth: parent.width * 0.32
                    BottomBarItem {
                        id: centralButton
                        visible: false
                        anchors.fill: parent
                        onClicked: bottomBar.centralButtonClicked()
                    }
                }

                Item {
                    Layout.preferredHeight: parent.height
                    Layout.preferredWidth: parent.width * 0.32
                    BottomBarItem {
                        id: rightButton
                        anchors.fill: parent
                        visible: false
                        onClicked: bottomBar.rightButtonClicked()
                    }
                }
            }
        }
    }
}

//BottomBarItem.qml

import QtQuick 2.9
import QtQuick.Controls 2.2

Item {
    property alias text: buttonText.text
    signal clicked()

    id: item

    Column {
        anchors.fill: parent

        Item {
            height: parent.height * 0.6
            width: height
            anchors.horizontalCenter: parent.horizontalCenter
        }

        Text {
            id: buttonText
            height: parent.height * 0.4
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }

    MouseArea {
        anchors.fill: parent
        onClicked: item.clicked()
    }
}

When the program starts everything works well and the bottomBar is visible.
Then I click on the NEXT button -> second page is shown.
Then I go back to the first page and the bottom bar has disappeared.
Am I doing something wrong?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật