Can confirm. I live in a 450 square foot studio apartment and I work from home every day. I would love a separate room to just be my "office," but my only room is already my kitchen, bedroom and living room too...
I don't have a feeling for how big that is, but I work from home in a small flat. I have found that I can get this separation from only using my desk for work. I don't sit in my office chair or at my desk in my own time, if I'm writing code in my free time I do it on my sofa or at my coffee table.
Alternatives I've heard from others are things like dressing up for work. I had a colleague that wore a suit to work every day (at a tech startup) so that when he got home he could change into something else. That helped him define a boundary.
Find what works for you, it doesn't have to be physical space.
That's actually a great point - the days that I put on a button-up and nice jeans as if I was going into an office are days that I'm way more productive, as opposed to wearing pajamas all day.
Well my dress up is limited to putting on a different t-shirt. (What's further down is irrelevant for zoom meetings) But it does help. I have a set of slightly more respectable work t-shirts and a very different set of home shirts. And it does change my mind set. And it is very nice to take it off at the end of the day.
Also my kids whom are stuck at home at the moment recognise the difference and "somewhat" tries to disturb me less if I got a work shirt on.
I find that going for a walk before / after work is helpful to get in the right mindset. Hopefully that's an option available to you.
Make sure you've got everything ready to go when you 'arrive'. Don't do chores during the day -- but if you have a partner, discuss your reasoning for this with them beforehand.