Always seemed to me that for software, a copyright would be the preferred tool, but this is an area I don’t know much about.
Me neither, but it does seem more like a copyright issue.
OTOH a patent drops dead after 20 years and a copyright is for 50 years AND IS RENEWABLE...