That is a very good question and something I have been struggling with. Do you have any ideas?
I know that it has been done (ex: Sidekiq has OSS, Pro and Enterprise versions).
My thought was to maintain a private fork for the pro version and continuously merge in changes from the OSS version, as well as add back any features into the OSS version that could be beneficial to everyone from the pro version.
But this does sound messy.. would love to know how others have done this in the past.