I am losing hope day by day in making a comeback. I am interested in SDE and ML related roles.
Help me with your suggestion.
Being laid off is just part of life, people get laid off all the time, it's okay. Perhaps try meanwhile to engage to some open source project and start building something so you use this time for something in case somebody asks you.
Even though we are still in babysteps with meetups and conferences, they are still happening. You can take part on them online and try to talk with people. It helps a lot to know people, many times I've got invited to work in companies by colleagues that I've met them in conferences. Of course, dealing with the social context is very complex for me, but in conferences everybody is generally a weird geek, so with a bit of effort it is doable.
There are cities and companies that basically take anyone with common sense and you with a MS in CS... you can probably do well in them. Just be patient and make a lot of interviews :-) Don't take rejections badly and just try to find out what you could have made it better.
As an example, I live in a city with a hot tech market and last time I've looked for a job, I did much more than 10's of interviews despite having a good CV and experience, people still would reject me. It's normal, sometimes they want somebody with a different personality or skill to fit exactly with the team they have, don't take it personally.
Cheers and good luck.
Find some charity that needs volunteer work. Or some open source. Companies what to see you doing something germane during your off time, not catching up on TV.
When you are laid off, the new company has NO idea why you were laid off. You might have been laid off for business reasons. Or because you were a trouble maker. It is assumed better people were kept and you were not 'better people'. As such they tend to favor someone currently employed. Therefore you have to show value.
Have you at least had interviews since being laid off?
How long did you work at company before being laid off?
What do you tell people when they ask 'So what have you been doing these last 6 months?' Assuming you are getting interviews.
Have you tried a remote job?