Here's what I think is going on. First, to do the ImageAlign
Mathematica is automatically setting an alpha channel. Second, ImageDifference
is designed to work with masks, and for an image with an alpha channel, everything that is non-transparent becomes the mask. So, I think what you need to do is explicitly remove the alpha channel:
ImageDifference[withPill, RemoveAlphaChannel[ImageAlign[withPill, withoutPill]]]
(I've changed the name of the images so that I could keep them straight in my head. Also, this is just my best guest, I'm not an expert on how all of the image processing functions are designed to work.)