Fixed frame in presentation mode

I have made a plugin for watermarking, but I need to some how fix the new frame from scrolling in presentation mode.

Manually I would go to Prototype > Scroll Behaviour > Position: Fixed

But I there a way this be done with javascript and the plugin api code?

This returns the number of children which have a fixed position.
So is there a way then to actually fix a frame in Figma plugin api? As i am creating a new frame and need to fix it so it wont scroll.

const newFrame = figma.createFrame();
//need to fix newFrame

Yes, you can. Get the parent of this frame and change its property value, the link to which I left above.