I've been following the Amplify Gen 2 tutorial here: https://docs.amplify.aws/angular/start/quickstart/
I'm using Amplify Gen 2 and have a simple Angular 17 standalone app. When locally I run npx ampx sandbox then ng serve my app, I am able to signup and signin/signout multiple times. However, as soon as I alter the app and it reloads, I am signed out and on trying to sign in am warned There is already a signed in user.

I can access the user pool in AWS for my sandbox and sign the user out:

.. however, this makes no difference. The only way I can get it working again is to delete the sandbox and regenerate it.
There's nothing much going on in app.component:
<amplify-authenticator>
<ng-template
amplifySlot="authenticated"
let-user="user"
let-signOut="signOut"
>
<h1>Hello {{user?.signInDetails?.loginId}}</h1>
<button (click)="signOut()">Sign Out</button>
<h2>Welcome, {{ user.username }}!</h2>
</ng-template>
</amplify-authenticator>
Unsure if this is relevant, but in resource.ts the Amplify auth is configued as follows:
export const data = defineData({
schema,
authorizationModes: {
defaultAuthorizationMode: 'userPool',
},
});
Any ideas at all? Not getting much confidence in Amplify Gen 2 with such a basic blocker so early on...