This error is due to a DAGNetwork object being inputted into the trainNetwork for the layers. The correct workflow is to use a Layer array or a LayerGraph object as input to trainNetwork:
To fix the issue, convert the DAGNetwork object into a LayerGraph object first before training:
>> newnet = trainNetwork(source, layerGraph(net),options);
The layer graph describes the architecture of a DAG network (layers and connections). Net.Layers is missing the connections causing those errors.
