Lets say a topic is non constructive - off topic and there was no real question to answer and it was a rant-disguised as a question and you flag the post as off topic. but few hours latter you find the post to be closed as non-constructive. on some posts you find the opposite happen. What happens to your flag weight? does it decrease as what you raised was not a valid flag as per the action taken?
Flag weight from moderator flags is based solely at the discretion of the moderator who dismisses the flag. It is not directly tied to the actual fate of the question, in both time and reason. Rather, only our reasons are.
What we base our dismissal on (and is reiterated to us on the flags dashboard itself) is whether or not action was taken. You may not specify the correct course of action, but you still brought the post to our attention and it needed our intervention. So in your example, if you flagged something as off-topic, but the moderator closed it as not constructive, then it remains a valid flag because something had to be done.
It is preferable that you do flag for the appropriate reasons, of course. Don't consider this an invitation to just flag whatever you want when you see a problem post. If it's an utter nonsense flag, it probably would get dismissed as invalid. If you're merely being incorrect repeatedly while still flagging problem posts, I imagine you might get a helpful contact on the subject of your flagging patterns.
In addition to Grace's answer, some clarifications: some flags (hopefully an increasing number) are now automatically dismissed (with appropriate credit) without moderator involvement. This includes off-topic flags for anything that ends up getting closed as off-topic or migrated, deletions, and a few other common scenarios.
Our aim there is to reduce the weight on moderation.