Indeed, as discussed in issue https://github.com/openwebwork/webwork2/issues/1473 -- which can be found in that thread -- setting the External Tool (LTI) in Moodle to open in a new window allows to setÂ
$session_management_via = "session_cookie";
respectively leave the line with that variable commented out. Only if WeBWorK opens embedded in Moodle, that issue occurs for homework sets.
Thanks Danny.