AutoOpen with Flexible Sync

I’ve implemented flexible sync using the examples in the documentation using the following code each time the app opens and a user is logged in:

    app = RealmSwift.App(id: "app")

    realmConfig = app?.currentUser?.flexibleSyncConfiguration()
    realmConfig?.objectTypes = [Users.self, Tasks.self]

    realm = try! await Realm(configuration: realmConfig!, downloadBeforeOpen: .never)

If the app does not have connection prior to starting and trying to open the realm, the realm does not open and I am not able to save objects.

Does @AutoOpen work with flexible sync, or should I be implementing opening the realm in a different way to enable interaction when there is no connection?

Thank you in advance