iPadOS Photos Freezing in Stage Manager

I was trying to add photos to a shared album on my iPad running iPadOS 16.5 (the latest). Everytime I tried to add a photo from my library to a shared album, the app would freeze and I would have to force quit it. After googling I discovered that this is a bug related to stage manager. If you turn off stage manager, the app stops freezing.