WordPress will overwrite the entries between ‘# BEGIN WordPress’ and ‘# END WordPress’. While most plugins will create their own begin and end tags and only update within those tags.
Simply put your custom entries outside of any custom tags/comments and they SHOULD be preserved when WP updates the file.