com.whatsapp_preferences.xml periodically gets overwritten how to prevent that from happening on a magisk rooted Android 10 device
com.whatsapp_preferences.xml
( /data/data/com.whatsapp ? ... can't remember that path now )
has been updated with non default parameters as I needed but it periodically gets overwritten how to prevent that from happening. 
what I did so far
even if reMount the partition as read write ( for my convenience I do it using total commander with root  though  I haven't tried I would assume it would end up the same way if I did it on command line ) it will not let me overwrite the original file with my modifications   &amp; but if I  delete the original and copy the modified file that is allowed.  funny...why   ?
I did this and then chown (  to  root ) &amp; chmod ed it to 444 then force stopped the app
cleared cache .new settings were working until next day I landed up with the same old file that it overwrote
question 
now I am aware that for WhatsApp or any app to be able to write it should be the owner or maybe  the owner should be everyone .. that is the case here as well but the issue is how can I selectively prevent it from overwriting just one file  - implement this at file level   ?  alternatively how do I conceive a method that periodically overwrites the the original file with the one I have... after detecting that it has changed.
btw : my APK and data  is linked to to second partition which is ext4 via apps2SD
Changing the permissions of the file can solve the problem.
Get the WhatsApp system group, you can use:
ls -la /data/data/com.whatsapp                                                       

Let's suppose that the WhatsApp system group is u0_a301.
Change the owner of the file to root and the group to WhatsApp group:
chown root:u0_a301 /data/data/com.whatsapp/shared_prefs/com.whatsapp_preferences.xml

Then remove the write permission to the group:
chmod 640 /data/data/com.whatsapp/shared_prefs/com.whatsapp_preferences.xml

That will prevent WhatsApp from writing the file and it can read it.