Reshape - pass trough layer error

Foreword: OpenCV 4.5.3 + CUDA 10.0, Windows 10, C++, weights (.pb) generated using Tensorflow 1.14

Problem: When i try to run a custom network in which i inserted a reshape - pass trough layer some errors are issued and the inference is not performed.
The network is essentially an YoloV3 with some modifications and a single output layer.

Network structure: the involved part of the network has the structure
reshape_1
summarized as follows:

input = add_3/add

op: Shape
input = add_3/add
output =reshape_1/Shape

op: StridedSlice
input =reshape_1/Shape
inputs ( const ) = reshape_1/strided_slice/stack, reshape_1/strided_slice/stack_1, reshape_1/strided_slice/stack_2
output = reshape_1/strided_slice

op: Pack
input = reshape_1/strided_slice
inputs ( const ) = reshape_1/Reshape/shape/1 ( value 52 ), reshape_1/Reshape/shape/2 (value 52 ), reshape_1/Reshape/shape/3 (value 512 )
output = reshape_1/Reshape/shape

op: Reshape
input = add_3/add
input = reshape_1/Reshape/shape
output = reshape_1/Reshape

The output goes to a
ConcatV2 operation

Errors: the errors are summarized as follows:
[ERROR:8] global D:\Flyby\OpenSIGHT-3rdParty\OpenCV\opencv-4.5.3\modules\dnn\src\dnn.cpp (3512) cv::dnn::dnn4_v20210608::Net::Impl::getLayerShapesRecursively
OPENCV/DNN: [Concat]:(concatenate_1/concat): getMemoryShapes() throws exception. inputs=3 outputs=1/1 blobs=0
input[0] = [ 1 128 52 52 ]
input[1] = [ 1 256 52 52 ]
input[2] = [ 1 52 52 512 ]
output[0] = [ 1 128 52 52 ]
Exception message: OpenCV(4.5.3) D:\Flyby\OpenSIGHT-3rdParty\OpenCV\opencv-4.5.3\modules\dnn\src\layers\concat_layer.cpp:102:
error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function ‘cv::dnn::ConcatLayerImpl::getMemoryShapes’

Observation: it seems that an input layer of the Pack operation has a wrong dimensions order
it is
input[2] = [ 1 52 52 512 ]
it should be ( i suppose )
input[2] = [ 1 512 52 52 ]

the output then should be
output[0] = [ 1 128 52 52 ]

then, the ConcatV2 operation generates the error

The correct output of the operation should be
output[0] = [ 1 896 52 52 ]

( not [ 1 128 52 52 ], that is generated because the concat operation has been interrupted )