The differences between the two images aren't due to any particular mosaic or demosaic setting. It is due to the way the camera's jpeg engine is interpreting the information in the raw file compared to the way whatever raw editor you are using is interpreting the information in the raw file based on a large number of settings you have selected, none of which are named mosaic or demosaic.
For more please see:
Why do RAW images look worse than JPEGs in editing programs?
While shooting in RAW, do you have to post-process it to make the picture look good?
Match colors in Lightroom to other editing tools
If you want to apply the same (or nearly the same) processing to a raw file that was applied to that file by the in-camera processing, you can try the raw conversion software provided by your camera manufacturer. Most of them will even open a raw file using the in-camera settings at the time the image was created. Most third party raw processing applications ignore the in-camera settings when opening a raw file. Instead, they use whatever default profile has been selected in the application.
For more info, please see this answer to: How can I undo Canon Auto Lighting Optimizer in Lightroom?