Gentlemen,
I am not an expert in CAN, so I will ask one of my colleagues to respond to your question.
However, the C code is generated on top of the S32K SDK for Arm. Currently, I don't see any API function that resets the CAN module.
A starting point will be to use the FLEXCAN_DRV_GetErrorStatus driver function, which returns the ESR1 register value. By having a look at this register, you can know in your code, when the Bus becomes IDLE. We don't have a block for that, but you can declare a Data Store Memory of uint32 and insert a custom code, to periodically call this function.
The only idea I have right now is to try to deinit and reinit the CAN module when the bus becomes IDE. I don't know if this is the right way, and I think there should be a more elegant way of solving this scenario. I will ask other engineers and we will reply here.

Regards,
Marius