Unfortunately the developer who wrote this library SoftwareSerial no longer works for Arduino. But she gave me a hint via email about what needs to be adapted.
In order to achieve the desired behaviour we should modify the SoftwareSerial library in order to change pin configuration every time is required (e.g. you always set the pin as input, then when you need to write, we can set the pin as output and revert back the input mode as soon as the write is over).
Does anyone have an idea how to implement this?