Why can I only send 28 holding registers over modbus?

... or as a workaround define two objects and split the registers...

Modbus slave(1, 0, TXEN);
Modbus slave2(1, 0, TXEN);

you know what I try to say?

That doesn't help. The size of the array supplied is not the problem but the buffer size of the result message.