With the verb prefer, the difference is meaning is minimal,
The donor prefers to remain anonymous.
=> prefers to BE or DO something <action>
The donor prefers remaining anonymous.
=> prefers something. <thing>
Here are some great resources:
- For Teachers