After fiddling, I found that this works
$job = Start-Job -ScriptBlock { ....
$null = Wait-Job $job | Out-Null
$output = Receive-Job $job -Wait -AutoRemove | Out-Null
$job = $null | Out-Null
note I had to restart the PS editor many times since it does not always take the modifications (VS Code or integrated PS editor)