We got those who are lot more respected for their acting than they ever were for their music; Will Smith and Mark Wahlberg fall into that category. On the other hand, Mos Def never had that one big hit that can define a career. His acting has completely overshadowed his music.
Paul Peterson of "The Donna Reed Shiw" (one of his singles was produced by Brian Wilson) Shelley Fabares (same TV show as Paul) - Johnny Angel Don Grady ("My Three Sons") - Yellow Balloon Stuart Margolin ("Rockford Files") - in a band called Shango, had a minor hit called Day After Day (about earthquakes)
For many actors, their music represents vanity projects. No different those who use studio formula pictures to finance the art-house films that almost no one will ever see. But for many rappers, acting is the vanity project.
FWIW, Johnny Depp was a musician before he was an actor. He came to LA to make it in the music biz and acting was supposed to be a side hustle. He didn't totally give up on music until he got the lead in 21 Jump Street. The band Depp was in, the Rock City Angels, cut an album for Geffen shortly after he left. It was OK hard rock, but went nowhere and they were soon dropped.
David Soul from Starsky and Hutch tv show. He had one fairly well known top 40 record....Dont Give Up On Us Now.
Well then, I will argue that Rick Springfield is one of the great songwriters. Excellent guitarist and singer too. Not only that, his current output is some of the best of his entire career. Just check out his last three of four albums. Not a weak track on any of them.
For his recent work you may have a point, but he put out an album in his 30s. See also: Leonard Nimoy released FIVE ALBUMS between 1967 and 1970.
He was a musician long before he was discovered as an actor. He shares his lyrics, which are really good, imo, in his autobiography.