Contact the plugin creator and ask.
From what I have read CopyFile2 is Windows 8 and up.
Xojo 2021r1.1 should not use that, so everything point to the plugin you are using.
Plugins evolve independently of Xojo, so, there’s a tendency of bringing-in updated APIs over time even if you use an older Xojo.
Well, in Xojo the built-in gzip plugin and the SQLite database plugin need both CreateFile2. All Web projects need gzip. And the HTMLViewer with Chromium may use CreateFile2.
If you avoid these three, you could maybe make an app that runs on older Windows.
But in general I would suggest using an older Xojo version instead. You can download it form the Xojo download page.
Older than that?
For Xojo 2021r1.1, you have CreateFile2 references in the Chromium libraries and SQLite libraries. So Gzip should not need it there.
Maybe it’s a useful information for somebody: In my case it was the Valentina db plugin. They will update their system requirements information and remove Windows 7 from the supported operation systems list.