I’ve noticed, though, that my palettes snap to any child windows, dialogs, and popup menus that the application spawns
Yes, I’ve had this issue also.
Is there a way to keep the palette attached to just the main windows
Yes, although how you do it depends a lot on the application. The best I’ve come up with so far, is to add one or more IF conditions to check the window title, or check for a specific button, or something like that. Most often, I check it for something telling me NOT to snap the palette, like this, which I use for Finder:
I suspect that @ccstone might be able to come up with something more generic, based on window classes or some such thing, but this is the best I’ve come up with. It works, but I usually end up finding more conditions I have to add, as I continue to use it.