Override a theme template variable with a module I created two variables for use in my theme's page templates. I used variables because I wanted that value to be flexible. 

function mytheme_preprocess_page(&amp;$variables) {
  $variables['var1'] = 'value1';
  $variables['var2'] = 'value2';
}


Without creating a new page.html.twig template, I want to choose new variables in mymodule. Like, maybe...

function mymodule_preprocess_page(&amp;$variables) {
  $variables['var1'] = 'newvalue1';
  $variables['var2'] = 'newvalue2';
}


This isn't working. I have a feeling it's because themes get priority? Any ideas?

Edit: I should clarify. How do I do this?
Taking the lead from @Alfred Armstrong above and my colleague, this ended up working!

In mytheme.theme

function mytheme_preprocess_page(&amp;$variables) {
  if(!isset($variables['var1'])) {
    $variables['var1'] = 'defaultvalue1';
  }
}


In mymodule.module

function mymodule_preprocess_page(&amp;$variables) {
  $variables['var1'] = 'myvalue1';
}