I’m a freelance developer. My clients pay for a perpetual non-exclusive non-transferable license to the software I write for them. I explain this very clearly to every client, and tell them explicitly that I hope and intend to sell the same software (probably with modifications) to another client down the track. I’ve never had a single client push back on this ever. I could definitely imagine for some companies this arrangement might be a dealbreaker for whatever reason, but I don’t think it’s all that unusual.