(The instructions are from the original project. My comments are under Notes and Credits.) This is to illustrate a problem which occurs when using the pen to draw, while using a hitbox costume with the "if on edge, bounce" block. The costume is the same size as the pen dot. As you should be able to see initially, it bounces too early. The problem occurs when the sprite is hidden and the "set rotation style" is not set to "don't rotate" (the default is "all around"), and manifests itself by bouncing the sprite before it actually touches the edge of the screen. The problem is resolved by setting rotation style to "don't rotate", after which it can be set to "all around" again. It also bounces properly if the sprite is shown (even if ghosted), but this doesn't fix the problem if the sprite is hidden again. Press the R key to toggle rotation style. Press the S key to show and hide the sprite. All code by me (@kriblo).
My contribution to the original project is that I added a stamped square representing the bounding box, making it quite clear what is going on. Why the sprite gets this bounding box when the sprite is hidden is still a mystery though.