> gives me the time to explore building something on my own. But it will definitely hurt my self respect.
In my mind, the time to explore building something of one's own is when one is working at a company. There might be limits due to IP assignment agreements, non-competes, time and energy, but that is the time to explore. Preferably it is going along with some success before leaving. I don't think the time to begin exploring is when one has no paycheck coming in.
Also, if your performance rating is lower than expected, you can explore a little bit, but now is probably the time to prepare for interviews.
> The other option is to start applying outside right away. But I have a lot of concerns. I know the market is hot for 2-10 years profile. Not sure about the senior level jobs. Even if I get selected for interviews, rejection will further demotivate me. I havent given interviews for a long time. I am very good at design, latest technologies etc. But I hate leetcode kind of interviews. The other problem is that, in a new company/job, I wont be able to focus on other things since the expectation will be high. I need to prove again. And eventually one will have the same problem no matter which company.
You should always be somewhat prepared to lose your job, so if you feel rusty at interviewing, you should be preparing for interviewing and then start going on interviews.
In terms of getting rejected at/for interviews being demotivating, there is a balancing act for you. On one hand you are rusty at interviews and probably need to go on some, on the other hand, you're right, if things are going bad at work, too many interview rejections probably will be demotivating. So brush up on what you need to before interviews (you mentioned leetcode).
I went on a number of interviews two years ago, and talk to other programmers who are interviewing, and have a fairly decent idea what is asked on interviews. Currently I feel fairly safe where I am, so if I planned on leaving I would spend enough time preparing to interview so that I would get a high percentage of offers at the seniority/salary level I am in now (or higher, but that would take more time to prepare). That would mean having ready answers for typical questions (tell me about an accomplishment you're proud of, tell me about a hard situation you encountered etc.), as well as leetcode, and also being up to date on the latest and greatest stuff in my main stack and framework. I would also interview at large companies first and then smaller companies, as larger companies take more time to make an offer and also the offer tends to last.
The clock may be ticking for you, so you don't have the luxury of as much preparation time as you want, and also you might be rustier on interviews and what might be asked (I was initially surprised by some question types on my last interview go-around I never heard before). You probably want to get one or two interviews done in the near future, the problem is if you get an offer it won't be a competitive offer. Or if it is a FAANG or something you want to have on your list, you knock it off your list before adequate prep. But you should probably start interviewing fairly soon. Even if you get an offer, you can still stay at your job.
Because it could be the situation that you don't prep adequately, go on a dozen leetcode interviews and get rejected by all of them, which crosses them off the list and is demotivating. So it's all a balance. You should probably interview somewhere fairly soon, after a little prep.
Another thing - a good, well-funded company might hire for a senior role, and get six applicants that get an in-person interview. You might be the second best applicant, and would be considered "good", but someone else might just be better (or better at leetcode and interviewing) and gets the position. From your perspective it is pass/fail, offer or no offer - from their perspective they might get two or three good candidates which you are part of but one is just a better fit and it goes to them. If you've interviewed a lot of people on the other side of the table you'll understand this. Sometimes you'll luck out because the best candidate takes an offer at a FAANG instead so then they give you the offer. But it's something to keep in mind - in your mind it is pass/fail, offer or no offer. To them you might be the second best of all the candidates but it is offered to someone else. I've been watching Youtube interviews about the making of movies, and at the end of the day the choices for the director are between one great and now famous actor and another. Don't get too demotivated by a no (of course 6-7 no's in a row would be demotivating, and would be an indication you need to prep more).