As far as I know, if your license is a softcontainer you can't. Because the license is bound to your raspberry pi by softcontainer. If you have installed your license on a USB dongle then there is no issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have an old RaspberryPI 2 model B with Codesys license. No I want to change the RPI with RaspberryPI 4. Can I transfer license from RPI2 to RPI4?
regards
As far as I know, if your license is a softcontainer you can't. Because the license is bound to your raspberry pi by softcontainer. If you have installed your license on a USB dongle then there is no issue.