As it has been already said in one of the comments, Windows should be not able to see the Linux partition, as it cannot read the ext4 filesystem that Linux uses by default. So there's nothing to do in this direction.
If you want Linux to be unable to see Windows files, you can uninstall the packages that provide NTFS filesystem support in Linux (NTFS is the filesystem Windows uses by default).
In my version of Ubuntu these are packages named libntfs-3g883
and ntfs-3g
. Removing the first one automatically removes the second. I guess the number at the end of first package name can be different in different Ubuntu versions. You can check the actual package names with the command:
dpkg-query -l | grep ntfs
Then type:
sudo apt remove libntfs-3g883
where of course you have to change the name libntfs-3g883
if it's different on your system.
This should make Linux permanently unable to access any NTFS formatted partition (of course you can always reinstall these two packages to get NTFS support again). Note however that it will also make Linux unable to access USB flash drives and external HDD drives if they are factory-formatted, because they are formatted by default with NTFS filesystem. You will be unable to use them unless you reformat them to use ext4 filesystem.