DonaldWinston thank you for the question.
Files should be indexed automatically only when they're changed. The initial scan is indicated in the VSCode status bar (bottom left).
We should not flag until indexing is finished - I'll take a look on that.
To update flagged lines, you can turn it off and on again. Use the command (from VSCode Command Palette) PHP: Background Code Analysis
:

and choose "none" and then again with "opened".