You can not generalize between "in" and "at." It is a matter of current practice, and I don't know how to impart the experience needed to decide. There are no rules that I know of.
To be "in" school can mean either that you are physically in the school, or that you are enrolled in courses AT a school.
To be "at" school means that you are physically at the school right now, or were at the school when your answer says.
You are always "in" a meeting, never "at" a meeting. However, you can be "at" a convention or a conference. You can be "in" a conference, but you can never be "in" a convention. It's confusing.
You are always "at" a party, never "in" a party.
Your last sentence is not always true - it depends on the circumstances and the context, and current practice in English. I do not think there is a rule of any kind.
Student or Learner