I at least wish it would not change your unit production mid-build when you discover something new.
This was the case for previous games as well. You can make use of it by prebuilding units you don't have access to yet by dumping production into their precursors.
If the advanced unit requires resources you can still build the precursor in some cases by parking all your resources of that type in the production queue of some fishing village (behind whatever the city is actually supposed to build). You can then build the precursor unit and upgrade it after removing one of the dummy units in the fishing village production queue. Requires very careful planning and micromanagement because there is more of the resource coming in all the time. I think it works like that anyway. This is a trick I saw in a MP game. Haven't tried it myself.