The UK will endeavour to continue in an EU science programme after Brexit.