For me there's something about being in a place with others that keeps me concentrated and focused on the tasks at hand, breaking up the monotony of working from the same room at home every day.
I try to have very regular calls with my team and arrange days to meet and work together from a location we can all get to with relative ease, along with full team meet ups at least every month.
RE lack of motivation, I think it's more of a company culture issue rather than WFH itself.