How do I stop R studio from marking open tabs as unsaved?

If an R script is open in a tab it often changes it status from saved to unsaved even if no changes were made.

saved:

image of unsaved tab

unsaved:

image of unsaved tab

This makes it difficult to keep track of which scripts were actually changed.
Why is R studio behaving like this and what can I do to stop it?