Exporting Drupal user account ID's through Civi search
We needed to do something similar, though not GDPR related. Because the Export does not access the Drupal user fields, we created a simple View (page display) to give us this data, based on CiviCRM Contact.

We also used the Views Export Data module and 'attached' the csv to the Page above. Note the page is not required, you can simply use the csv display via the URL you configure for it.