I can see all sides of this.
When FIL broke his hip and had brain damage during the hip surgery, it became hard for MIL to take care of him in their old row home. We built a granny flat in the back part of our yard.. Everything handicap accessible, ramps, roll in shower, etc. MIL didn't like living in California - so they only lived in it 6mos a year for about 6-7 years. (We've subsequently rented it out and it is part of our income stream.) It was detached, with a private (fence separating) walkway - further away from our house than our neighbors on either side. But close enough we could help if FIL fell, or MIL needed help. And my kids got to learn the wonders of having an Italian grandmother make them dinner and snacks.
When older son bombed out of college, right as covid hit, he moved home. He finished up the semester and we gave him options: 1) Go to school full time at the local community college. If grades were good, we'd give a stipend. 2) Get a full time job, pay a small rent ($200/month). 3) a combination of 1 and 2 (part time school, part time work.). Rules were: he couldn't hide in his room, had to interact with us occasionally (family dinner satisfied this.). Had specific chores each week - including help with meal prep and clean up. No friends (male or female) upstairs, and no drinking/smoking/drugs of any kind. If he was going to stay overnight at friends he had to let us know so we didn't worry. He moved out about 6 months later... a few months after that started back at the community college where he was living, and when covered tuition/fees/books... when he went full time, we gave him some money towards rent, but he still had to work. I have friends who thought we were way too tough. But he's graduating with his associates next month, and starting as a transfer student at UC Berkeley in the fall as a math major.
I moved out 2 weeks after I turned 18. Took a wandering path towards college. Moved home for what was going to be 6 months after a bad roommate situation while I was studying engineering. That was a disaster for everyone involved. It was negotiated that I move back out after 3 months... we were all miserable. My dad and I talked about it later - he considers it a success because he wanted me to stand on my own two feet.
We have a nephew and a niece (different in-law parents) who are at home. Nephew is in his 40's and hasn't had a job in over 10 years. Probably has mental health issues that he refuses treatment over. He has a PhD and used to teach. He's been married and divorced. Everyone in the family, including his siblings, wonder what will happen to him when his parents (in their 70s) pass. The niece is in her mid-30's and on the spectrum but super high functioning. She did well in college, but is having a real problem launching. Her parents are working hard on building her up to live in a small apartment near them... but she's not there yet.
It's never black and white... families have to do what they have to do.