if your using mat-sidenav give an id to the router outlet( if you have a parent and child router outlets) and use activate function in it
<router-outlet id="main-content" (activate)="onActivate($event)">
and use this 'mat-sidenav-content' query selector to scroll top
onActivate(event) {
document.querySelector("mat-sidenav-content").scrollTo(0, 0);
}