I tested this out quickly. Indeed, the app auto creates an id of the form @nc.domain.com . After domain change, it doesn't adapt. But I don't think this is a bug in the app. Most of the federated apps (even outside nextcloud) cannot change their domain post installation.
I thought the same!
It seems to be a bit of a bugger that, on the other hand, I located the folder for well-known but nowhere does it show the URL in the files in the well-known folder for the app.
I have messaged the developer of the app to see if they could put in the description to only install on a URL that will not change or find a way around it but I don't think the developers of federated apps have it high on their priority to make domain name changes possible.