I feel like a good story isn't out of place in Sonic or even Mario it's just that, while Mario's case is more Shiggy being avoidant of the idea for fear of watering down the game (which is extremely ironic once you consider Star Fox Zero and whatnot), Sega's case is more... A lot of their writers are really bad at it or don't have the "real estate" necessary to write good, and I feel the rushed development doesn't help.
Forces had the issue of Sega pushing hard with Sonic Wars but then getting cold feet, resulting in stuff like plot points being lost and Mephiles being excluded from the game for one. Aaron Webber even gave his critique on a lot of the original plot (and current plot at points, see: Tails)'s use of clichés and strange decisions to the Japanese team and a lot of it was just cast aside, likely due to time.
In my opinion, Sonic is the perfect place to put a complex story. There are elements of good storytelling in the Adventure series, Battle, Rush and Rush Adventure, the Storybook series, etc. However, I feel like SEGA lately don't really know what a good Sonic story looks like. Forces tried to go the hardcore edgy route, but like you said couldn't fully commit. This decision wasn't entirely misplaced, they probably at some level realized that while it's okay to have edgy elements to a Sonic story, it's best to keep it as elements rather than sinking in too deeply with it. However, they still in the process ended up misunderstanding what Sonic storytelling looks like at it's best, and even struggled to understand each of the individual characters. Everything in Forces feels off in some way, and the only character to truly experience any development is the playable Avatar, which even then is only just barely.
A well written Sonic story should feel big, grand, epic, adventurous. At times light hearted, at times a little edgy. There should be mysteries to solve, threats to overcome, character arcs to experience, vast landscapes to explore, etc. This was what I feel the Adventure series was trying to capture with it's story, and also what 06 tried and largely failed to amp up. The feeling of going on a big, grand adventure alongside the characters is Sonic storytelling at it's peak.
Sonic and Shadow are kind of like Superman and Batman in a sense. Sonic as a character from the beginning has always been about rebellious angst, he's a teenager. However, while his angst is a big part of his personality, his storytelling doesn't revolve around it, but rather as I mentioned above more about the grand adventures he and his friends are going on together. He is a character that allows for great amounts of character depth in regards to being able to go from cracking silly and light hearted jokes to getting really serious as needed.
Shadow, like Batman, is a character who's stories are more able to explore into the edgy side of what's going on. His personality is more blunt, to the point, and morally ambiguous. He is a character that is believably able to tread back and forth between darkness and light. He can be a shield to protect the weak, or a sword to mercilessly cut down his enemies. His inner battles with his own morality allow him to go on adventures unlike the ones Sonic goes on.
This, I think, is the crux of Forces' failure, and to a certain degree 06 as well. They tried to have it both ways, capturing the adventurous spirit of a Sonic story with the edge of a Shadow story, and it doesn't blend very well together for the franchise.