For me, it’s repeatable with all code posted here, including my simplest:
call FolderItem.ShowOpenFileDialog( "" )
But here’s the key for me. If I don’t first left-click to select a file, it fails. Right-clicking any file without left-clicking any file causes the problem. Once I left-click a file, it works as expected to that file or any subsequent right-click. Though the selection changes, it’s like it never realizes it from right-click until a left-click happens.