I just had a very similar issue. I had a small Apex class where I was certain the code coverage was at, or at least very close to, 100%.
However, the developer console was reporting that it had only 60% coverage. Also, the code coverage lines weren't lining up in a meaningful way with the actual body of the Apex class. It was showing coverage over comment lines and nothing for several of the later lines in the class.
This lined up with the symptoms of the known issue Updating an Apex class through Metadata API makes its code coverage corrupt. After I deleted the ApexCodeCoverageAggregate records in the org and reran the tests the code coverage successfully reset to 100%.
So I'd suggest deleting those records and running all the tests again. It is likely that the process creating the managed package is independent of the ApexCodeCoverageAggregate records.
In addition to the known issue above this is also the knowledge article: Code coverage steps and considerations prior to deployments. This also covers deleting the ApexCodeCoverageAggregate records.