WARNING: This page is about a different car, the 2023 BMW X5, 2022 BMW X5, 2021 BMW X5, 2020 BMW X5, and 2019 BMW X5. However, it is still accessible from the selected car via links, so may be relevant.
Detach the tailgate seal (1) from the body toward the rear, beginning at the top center, and remove.