DOTNET_USE_POLLING_FILE_WATCHER environment variable is not working on the default 5.0 SDK image.
The problem does not occur on the sdk:5.0-alpine image.
I have created a repository with a reproduction of the issue: https://github.com/Szymon-D/DotnetPollingWatchRepro.
You can test it by running "start_*.sh" scripts and then making any change to the "Program.cs" file.
From the tested range of images (sdk:3.1, sdk:3.1-alpine, sdk:5.0, and sdk:5.0-alpine), the issue with watcher occurs only on sdk:5.0.