You do need to use Publish, but you need to set the Deployment mode, in the Publish, screen after clicking Show all settings, to Self-contained and under File publish options: enable Produce single file and enable ReadyToRun compilation
Show all settings
File publish options
Produce single file
ReadyToRun compilation