When adding the detail layer, in Blender 4.0.2 I found I'd get a white halo around my strokes, as below.
Update:
The solution is simple- just make sure the image color is BLACK when you create it, not the default white as in the video.
Straight alpha is okay, leave it alone!
Old Message:
Blender has added a new option that tells blender how to interpret "Alpha".
You will need to ensure that it is set to Premultiplied before you start painting:
When I created the texture, the alpha was set as "Straight", so it seems to be a weird default?
Premultiplied alpha is pretty normal for realtime Vulkan/OpenGL stuff, but it loses some information over non-premultiplied, so while Blender could want to preserve the RGB channel rather than blackening it for alpha = 0, it apparently didn't account for that when it fired it at the screen.
The option use to be in the n-panel of image editor if I remember correctly. 4.0 just makes it easier to access.
Image layer + final composited layer in shaded view:
Note: if I set the color to _black_ when I create the image, things work out okay- so now I'm thinking that it's the base color of the texture being white that is causing the issue. i.e. you are right, Straight is the correct mode after all, but if you follow the steps exactly as in the video and the base color is white you will get ghosted strokes.
There is this very old but very great CG Cookie video of Bartek talking all the technical details of the alpha channel. The knowledge still holds up, totally check it out: