Spheres and cylinders include their origin in the effect. Other area spells are at the casters option. Apart from that restriction, casters get no protection against their own spells.
Thank you all for the nice responses!
Yeah it makes sense, I've apologized to my DM and we're all good he actually had already forgotten about the incident haha.
In the future I'll work on AoE spells and implement them in my own campaigns.
I love learning new things and rules about the game and becoming a better player and DM, I really appreciate you guys' help .