Erik, sorry, I misdefined the problem at the beginning: The WAIT command does stop the following commands from running in both the console and a . CMD. What happens is that when it is run from SD_card it also freezes the operation of the #ultra during the wait.
If we have CALC/AVER16 activated we can see better that when we send the above program from the console (I use TeraTerm V4.105), when reading the WAIT command it stops reading the commands for the wait time, meanwhile briefly informs on the screen with the sign 'Info:Waiting' and then continues to scan, perform the calculations and update the trace during the wait. Then, when the command to save the screenshot arrives, the screen is updated. This is the desired operation.
When we execute it from the SD_card, it leaves the screen frozen with the sign 'Info:Waiting', apparently without doing any other action during the wait. After waiting, when the command to save the screenshot arrives, the screen is not updated, but it is the one that was at the beginning of the wait.