As I was on maternity leave, I was not invited to apply

I have worked for the same company, in advertising, for 8 years. I’m coming to the end of my second maternity leave. Before my mat leave I was effectively, but unofficially (not recognised in pay or title – I’d stepped up of my own accord, hoping to get the recognition at some point. More fool me!) running a team of 7 people and was on the management team. After I’d been on mat leave for about 3 months I found out, via LinkedIn (!) that a male colleague had been promoted to head of the team. I had not been invited to apply for the role and they made up some rubbish about it being a role especially created for him (I know for a fact this isn’t true). Now, on my return I have to report into him and he is now on the management team and I’m not. It’s frustrating and embarrassing, I feel like I’ve been demoted. But because this is advertising, they make up their own rules as they go along and so can wiggle their way out of anything with stories of restructures etc.