NSF is an "independent agency" [1] so if the job you were appointed to an confirmed by congress (senate) is at odds with the presidents desires I'm pretty sure it's supposed to be a problem for the president not you.
Similar to all those inspector generals who just gave up when they were illegally fired. Literally your job is to prevent the president from corruption, how are you going to do that now?
[1]: https://en.wikipedia.org/wiki/Independent_agencies_of_the_Un...