If a private view is covered by a view that has a transparent background and alpha 1 it won't be masked with the pattern.
A new condition should be added which checks also background transparency.
Edit:
This is also reproducible if BottomNavigationView is added as a private view because it has a child which is covering it but is transparent with alpha 1.0