I expect if you want to transfer engineered mods, you need to be at the same shipyard as the ship you want to transfer to/from. i.e. sell the mod to the shop, swap ships, then immediately buy it back again.
It failed me today, selling a size 2 modded gimbaled pulse laser from my Conda to a Courier. No rebuy available after swapping ships. Need more tests, but those tests are expensive.