Trying to set detail item by x.y coordinates in specefic view , but not working

It is probably a combination of what you said and what @RevitRobot said.

.

Also Element Binding is a thing here.
So if OP ran the .dyn multiple times they Families on end up
in the last View which was picked.