Unfortunately, right now you can only set an element as fixed, but you can't set it to become fixed depending on a certain condition like scrolling the page.
Here's a workaround I've been using, that involves sort of a "cover" and 2 versions of the button.
Quick demo with a prototype:
I made the cover a slightly different color in the second screen, so you can see it.
And here's the file, so you can see how it's set up:
Hope that helps. Cheers!
Thanks for reaching out. In addition to the workaround shared by Spas K, you may also submit your feedback here: https://adobexd.uservoice.com/forums/353007-adobe-xd-feature-requests/suggestions/34603798-fixed-sti... and upvote the request to add your voice.
Hope it helps.