"The pandemic also shifted people’s work lives, with many professionals changing careers, starting business ventures or quitting their jobs altogether." Source: cnbc.com
I have read about the different meanings of "with" in at least 9 dictionaries, and none have provided an adequate explanation of why "with" can be used in that way. Also, I checked many websites for an explanation or breakdown of the grammatical structure of sentences such as that one, but it was to no avail.
Mind you, sentences like the one above are very common in writings, so I wonder why I can't see a good explanation of that grammar structure (if you know of an article that explained it, please send me the link).
My main problem is that I find myself using "with" in that way and end up not knowing whether my sentences are grammatical or not. For example, I recently made these sentence: "reorganization takes place in the big room, with the glasses being arranged on tray-like things", "console and mobile games accounted for 42% and 31% of worldwide spending on digital games, with people around the world spending 50 and 33 billion dollars on them respectively".And I am not sure whether those are grammatical.
As someone who is learning English on his own, I need to have a good understanding of that structure, so please explain it to me.