Yes. You can encode , either for constant quality or for constant bitrate. In your case you are looking to maintain constant quality of encoded video , and you would not worry about swings in bitrate as encoder looks to keep up with details of rapidly changing scenes (by varying the bitrate).
Please take a look at last pipeline in this link for an example of encoding for constant quality using x264 encoder. You can do same with x265 encoder as well.
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/gst-plugins-ugly-plugins-x264enc.html#GstX264Enc--bitrate