TensorRT klinear format with manually changed input dimensions fail

Description

I have been struggling with getting a custom input tensor format to work on TensorRT C++ implementation.
This is my input tensor definition of the ONNX (output tensor is the same).
image

The input and output tensors are kLinear.
The engine was built using trtexec.exe --onnx=mymodel.onnx --minShapes=x:292x297x5 --optShapes=x:292x297x5 --maxShapes=x:292x297x5

The input dimensions I use context->setInputShape are like this:

The data I get out after calling enqueueV3 (and setInputTensorAddress and setTensorAddress for the output tensor of course) is mostly noise . The data I set is formatted in regular linear memory format.

Am I missing something?

Unfortunately I cannot provide the model, because it is proprietary.

Thanks.

Environment

TensorRT Version: 8.6.1.6
GPU Type: GeForce RTX 3050 Ti Laptop
Nvidia Driver Version: 546.09
CUDA Version: 12.0
CUDNN Version: 8.9.5.29
Operating System + Version: Windows 11
Python Version (if applicable): 3.9
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag): baremetal

Anybody any ideas?