I’m not a ROS2 expert at all, but I know rosbag2 had serious problems losing lots of data. There should be a solution released soon, but it will require that you uninstall rosbag2
package and install rosbag2-future
instead. Read more here: Fast Forward Merging rosbag2 master API to Foxy .
Apart from that, the classical approach would be: get rid of Docker for the debugging purposes. Does the issue happen without docker? Also, be sure to use Foxy or Rolling ROS2 distros.