A behind-the-scenes look at the split!

Scott Disick and Sofia Richie called it quits just a few weeks ago, and many were quick to speculate it was largely in part due to the father of three dealing with deteriorating mental health.

Disick has always been open about his mental health struggles, as well as his addiction struggles in the past, and found that life isolated from supportive family really took its toll.

However, an inside source reveals that it wasn't just his mental health that caused Richie to call it quits! The young model was also apparently fed up with always feeling second best to his ultra famous ex, Kourtney Kardashian.

RELATED: SCOTT DISICK CHECKS OUT OF REHAB 

“Kourtney is not open to him in a romantic sense, but Scott is always flirting with her and thinks she looks better than ever,” the source notes. “The family also loves him and he’s like another son to Kris Jenner."

Currently, the reality star is spending time with Kourtney and their three children, Mason, 10, Penelope, 7, and Reign, 5, in Utah at the family ranch.

“Scott is so happy that he and Kourtney get along so well and how easy it is with her. It’s weird to everyone else, but not to them. They are really like best friends," the source revealed to UsWeekly

DON'T MISS: SCOTT DISICK AND KENDALL JENNER OPEN UP ABOUT KOURTNEY KARDASHIAN

The source also revealed that Richie felt Disick had more feelings than he was willing to admit for his ex, and that she never really felt like she was his priority. 

"Scott is always going to be in love with Kourtney," the source said.

"And that’s something Sofia has had to face since even before she got serious with him. It’s been an ongoing thing. It just became more apparent that his family was more of a priority than she was, and his family would be his main priority over anything and anyone,” they continued.

However, for now, the Flip It Like Disick star is focusing on bettering himself, and the Kardashian clan are encouraging him to do so. The clothing designer and reality star entered a rehab treatment facility in Colorado in May, but left a few short hours later after photos were leaked online.

Disick and Richie have yet to publicly speak about their split, but the source says Disick is happier than ever with his family in Utah.