It turns out when I created the stored procedure in Visual Studio I chose the Script... option instead of the Stored Procedure... option. The image below shows what I should have done.
Add the file as a Script resulted in the .sql file being added to a different ItemGroup in the project with no build properties. This is what caused the comparison to not pick it up as a stored procedure.
I determined this by looking at the properties of the .sql file (in Visual Studio) that I added and another .sql in the same project where the comparison worked. The file I added as a Script file had different properties than other files that were being treated as real stored procedures.
Moral of the story... make sure you add stored procedures in Visual Studio correctly.