I believe this is actually an OS issue (it is in verifier.dll, which I think ships with Windows) but there is no apparent way to file a bug report for a Windows issue.
When using an application with Page Heap enabled and under a debugger, the heap verifier will fail when attempting to free any allocation that was resized (with HEAP_REALLOC_IN_PLACE_ONLY) to require fewer memory pages than the original allocation required.
This appears to be because when you use HEAP_REALLOC_IN_PLACE_ONLY to shrink an allocation, it doesn't actually free the allocation, it just sets the UserSize to the new value, but the ActualSize is still the same. The heap verification done on the free appears to check if ActualSize is the appropriate size for the current UserSize. Since UserSize is now smaller, but ActualSize didn't change, it triggers a non-continuable verifier stop.