I usually work with ViewportLeft, ViewportRight, ViewportTop, ViewportBottom for these kind of things.
Easiest if the sprite has it's origin in the topleft-corner.
on start of layout
sprite set width = viewportright(q) - viewportleft(q)
sprite set height = viewportbottom(q) - viewporttop(q)
sprite set position = x= ViewportLeft(q), y= Viewporttop(q)
if the sprite has it's origin in the center : x= Viewportleft(q)+0.5*(viewportright(q)-viewportleft(q)) , y= Viewporttop(q)+0.5*(viewportbottom(q)-viewporttop(q))
where q is the name or the number of the layer on which the sprite is