variable value disappears in a second loop

Use get_the_ID(), not the_ID(). The latter just prints the value, it does not return a value you can store in a variable.

So …

$originalArticle = get_the_ID();