I found the solution. Just need to execute rtsp_media.set_shared(True) in the do_configure callback.
rtsp_media.set_shared(True)
do_configure
https://gstreamer.freedesktop.org/documentation/gst-rtsp-server/rtsp-media-factory.html#GstRTSPMediaFactoryClass::configure