Hi Markku,
We are not able to reproduce this issue. Type -raw command worked without any issue on Windows 10 OS on our local environment.
Can you please add some delay before and after "Type -raw" command and check its functionaly (just for debugging purpose).

Also, please try with different application and see whether the issue is specific to an application.

You can try with a simple notepad application.
Dialog
Title "Untitled - Notepad"
EndDialog
Type "Username: "
Type -raw $username
Type "\n"
Type "Password: "
Type -raw $password

Regards,
Dinesh