Steps to replicate the issue

On a wiki running MediaWiki 1.43, open a dialog or form that uses OO.ui.SelectFileInputWidget.

Click Select a file and choose a .docx file (e.g. foo.docx).

Observe that the filename (foo.docx) is correctly shown in the widget.

Without clearing the file via the “x” button, click Select a file again and choose a different file (e.g. bar.docx).

What happens?:
The widget still displays the first filename (foo.docx).
Console logging also shows that dialog.uploadDocument.currentFiles still references the first file.
The second file selection is ignored.

What should have happened instead?:
When selecting a new file, the widget should replace the old file selection:

The label should update to the new filename (bar.docx).

currentFiles should reflect the new file.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MediaWiki 1.43
(Worked correctly in MediaWiki 1.39.)