Why the object has a transparent outline (I don't know how else to describe it) at defocus.

I’m a total newbie to unreal engine 5 and maybe the question is very trivial, but I couldn’t find a tutorial on how to fix this (I can’t even formulate the question properly). Even chat gpt couldn’t understand me, so I’m going to the extreme of making my first post here. I really hope for a reply. Thanks in advance.

If rendering in Path Tracer disable the option on your post process or camera called “Reference Depth Of Field” It will remove the outline.

In your material, there is a Blendable Location setting. You might have to play with that and set it to Before DOF or something.