App-sidebar-nav component not updating when the underlying observable changes

Hi,
I am trying to make some of the the sidebar menu items have a badge depending on the user login / logout status. To do this I have added a showOnAuth member in the _nav.ts file see below.
attributes: { showOnAuth: true },
When the logon status changes to logged in the native navItems are used to create an observable which is used with the async pipe in the html markup. When the status chnages to logged out the observable is updated based on the showOnAuth member.

ngOnInit(): void {
this.afAuth.onAuthStateChanged(user => this.updateNavList(user));
}

updateNavList(user) {
if (user) {
console.log("…updating menu listing as user has logged in");
this.viewNavItems = new Array();
this.fileNavItems.forEach(element => {
this.viewNavItems.push(element);
})
} else {
console.log("…updating menu listing as user has logged out")
this.viewNavItems = new Array();
this.fileNavItems.forEach(element => {
if (element.attributes?.showOnAuth) {
element.badge = {
text: ’ ',
variant: ‘warning’,
class: "icon-lock ",
};
element.attributes.disabled = true;
}
this.viewNavItems.push(element);
})

}
this.navItemsObs$ = of(cloneDeep(this.viewNavItems));

}

<app-sidebar #appSidebar [fixed]=“true” [display]="‘lg’" [minimized]=“sidebarMinimized” (minimizedChange)=“toggleMinimize(event)"> <app-sidebar-nav [navItems]="navItemsObs |async” [perfectScrollbar] [disabled]=“appSidebar.minimized”>

When the user is logged out the sidebar menu updates OK and the badges appear. When the user logs out the sidebar menu does not update until the page is refreshed from the browser.

The issue is not that the updateNavList(user) {} function is not running as i get the corect console output from the logs and the underlying observable is updated as it works on refresh.
I think it is a deep cloning issue but dont know how to fix this problem as I am doing a deep clone. BTW if i just update the top level of the list (eg modify the name on one of the items then the change is detected ok and the top level name is updated but it still does not recognise the changes to the lower level attributes until the page is refreshed

Any ides?