I've been using Lightroom for many years, and I've never experienced this problem until the last two updates to the application.
When I upload photos to Lightroom, the app creates a folder that is by default named with the date, in this format: 20210403.
I usually rename the folder, in Lightroom, with something more descriptive, just after the upload is complete. For example, 20210403_family-gathering.
Starting with the previous version of Lightroom, after I perform this action, Lightroom loses the connection with the files in the newly renamed folder. A question mark appears on the folder in the Navigation panel, and in Loupe view, every photo now displays a small exclamation mark in its upper right corner.
When I click on an exclamation mark, a dialog box appears, like the first one of three that I've uploaded.
1Lightroom_missingphoto-ccc406f0-67d4-4b3d-bff7-05c1c0834148-835634586.png
When I click on "Locate," another dialog box appears. For example:
2Lightroom_missingphoto_select-94760d8f-1b85-462b-b489-24b48e58a8c8-1771050602.png
The first file, which is highlighted, is the one that is missing (although at this point, Lightroom has lost track of all of the files in the renamed folder). When I click the "Select" button, this dialog box appears:
3Lightroom_missingphoto_alread-79fdfacb-e016-4610-aaba-6f295e7d4035-643118839.png
Lightroom is obviously confused, and the only way around this, in the current version of Lightroom, is to quit the application and re-launch Lightroom. After I relaunch Lightroom, it re-finds the files and the exclamation marks are gone. When I quit Lightroom after renaming the folder from the most recent upload, I back up the catalog. I don't know if this is necessary, but I back up the catalog whenever I quit Lightroom.
This is a bug, which never existed for me, until the last two updates of the app.