I'm not sure if I should create a new post or this answer is fine.
Danny's answer is really great, and it helped me understand a really nice trick I found in Piccirillo-Hayden paper "New curiosities in the menagerie of corks" at https://arxiv.org/abs/2005.08928.
As he said, the key observation is that the exterior of any properly embedded unknotted disk is $S^1\times B^3$. In Gompf-Stipsicz, 6.2, the 1-handle notation is extended so that a dotted ribbon knot refers to the manifold obtained by removing the 4d neighborhood of the ribbon disk. This extends indeed because, in dotted circle notation, attaching a 1-handle is the same as removing the 4d neighborhood of the obvious disk the dotted circle bounds (you have to push it to the interior of the 4-ball so it's properly embedded).
Now, here's the trick: say we start with a diagram with a 1-handle and a 0-framed 2-handle which is a ribbon knot. Let their linking number be one.
As per Danny's answer, this means the 4-manifold is contractible, since linking number one means the 2-handle's homotopy class is that of the meridian of the 1-handle.
Now "switch" their roles, dotting the ribbon knot instead (and 0-frame on the other). The result will be contractible for the same reason.
But more than that, they will have the same integer homology sphere for boundary!
The boundary in both cases is the same because as far as the 3d boundary is concerned, the effect of removing the (thickened) ribbon disk of a ribbon knot or of attaching a 0-framed 2-handle along it is the same: Dehn surgery with slope $\frac{0}{1}$.
One just checks that the removal of the ribbon disk removes an $S^1\times D^2$ from $S^3$ and glues another one sending meridian to meridian.