Honestly, 2 years is not a massive amount of time. I took a year off to travel and no one cared.
Do some personal projects - and just tell people you were working on ideas for startups. They didn’t work out and now you’re scratched the itch you’re ready to get back to work.