She cannot claim songwriting credits, just rewriting a bit doesn’t negate intellectual property rights, so this isn’t something she chose to do. Royalties here meaning streaming revenue, are very difficult due to how the music industry is set up, as rightsholders have deep structures, owning lyrics doesn’t equal getting (all) royalties (I've worked in an industry very adjacent to this so I sadly know way more about music royalties than I ever wanted to know

I promise I have more interesting hobbies). Beyoncé will have needed to request (this is a rather informal process though) to record a cover or make use of samples from Jolene, meaning royalties for melody, performance rights, etc also need to happen - she could have changed every word but the rightsholders of the melody and production would still get their share. If Dolly owns 50% of the lyrics rights and Beyonce owns the other half - but Dolly continues to own 100% of publishing rights, she effectively owns more than Beyonce.
I assume both parties will have come to an agreement that works for both ends - Dolly has refused to give Elvis Presley credit before for a song she wrote and for which he wanted 50%, so it's not like she doesn't know what she is doing.