I figured out what the issue is.
The issue is that I had renamed the procedures and functions through the Management studio as I had later planned to revert the changes.
I then ran those scripts that were to re-create some of the existing procedures and functions after dropping them.
I don't know the internals of how this procedure works but I think why SQL Server was reverting it to an older version of the procedure/functions was because the older procedures that I had renamed still carried the same object ID's in the metadata. When I ran the scripts to create the renamed procedures, it was reverting my changes to the one that I had renamed.
How I verified this is by deleting the old stored procs and functions and then running my scripts that created them and after that I ran sp_refreshsqlmodule and it did NOT overwrite my changes.
Hope this helps!