I've had similar experience as you in a previous job. No matter what, I couldn't get people to listen to my ideas, and it actually felt like I wasn't part of the in-group (similar to certain high school experiences).
My solution took a few things. First, like you, I was part of a layoff. I eventually came to realize that the company culture was a big part of it, as I really didn't have that issue at previous employers (although I wasn't in, or expect to be in, a leadership position at that point in my career).
Secondly, I had to shake off imposter syndrome. Part of the feeling was that I was constantly working with newer technologies, and therefore always felt like a beginner. So I took a step back, and went for a position that was purely Linux based. Then, I approached the position as if I was a consultant who's job was to go in, identify trouble spots, and provide solutions. Getting into that mindset helped immensely, and combined with shaking the impostor syndrome feeling, allowed me to nail the interview.
Finally the last part was taking ownership over several key areas, things that I identified as having lacking skills in the organization that I could fill in for. This involved lots of cross training -- initially one on one, then building up to group training sessions (effectively meeting where I was the leader). That, combined with working with other key individuals in the organization helped me to understand what problems they needed solving, and from there delivering on those solutions (and not just writing code -- but starting off with the base documentation, such as functional requirements documents, system design documents, risk assessments, making pretty infographs, elevator pitches, the works).
Oh, and being the go to resource when other team members run into issues helped to build up a reputation that brings with it respect from various levels of the company.
Here's an idea -- many C-suite execs have customers that they handle personally -- these are long term customers that the particular exec handled from early on in the company. Find one, that has a nagging problem that you can solve. Make them happy, they tell the C-suite about how pleased they were to work with you, and you have a high level person that will go to bat for you in the future. Just make sure that you never screw up that customer.