Confessing to someone who has passed away in a dream may be because you have special feelings or memories for this person. These feelings and memories have always existed in your heart, but they can't be expressed or realized in real life. So it is also possible to express it in a special way in dreams.
However, this dream can't fully represent anything, nor can it be used as an accurate prediction to judge future events. If you have special feelings or memories of the deceased, you can express or commemorate them in other ways. At the same time, we should also be careful not to be overly superstitious. We should work hard and make positive progress in real life in order to truly control our own destiny and life.