I am only able to run your examples successfully with all 5 explicit assembly references at the top of the csx file.
For example, here's one of them:
#r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\PresentationCore.dll"
If I don't reference them, I get errors like:
The type or namespace name Application could not be found (are you missing a using directive or an assembly reference?)
Any idea why?