If the latch is getting stuck, even if you try to engage it when the door is open, then the issue is a problem with the latch itself. The latch has moving parts, which undergo wear and tear as it is used. Lubricating the moving parts might help with the sticking issues, but in some cases the latch will still not work properly. Normal wear and tear eventually causes a latch to become non-functional. The easiest way to deal with latch issues is to replace the latch entirely.
If the latch on a new door sticks, then the issue is likely to be caused by a problem with the installment. Wear and tear and damage issues should not be present on a new door. The misalignment between the door and latch cause the sticking issues. Friction is created as the latch rubs against the door frame, causing it to become much harder to open and close. There are two possible reasons why a newly installed latch is misaligned. If the door is not installed into the door frame correctly, the latch on the door is not going to line up properly. The latch could also be installed to the wrong place on the bottom of the door.
The screws holding the door hinges in place can loosen over time. It is not a common occurrence, but it is the first place you should check if the latch is working. Loose hinges cause the door to slack slightly in the frame. The amount of slack may not be visually noticeable or prevent the door from opening and closing. However, the latch is not going to close or it's going to stick if the door and frame are misaligned. Tighten the screws on all the hinges to ensure the hinges are not causing the latch to be misaligned.
The wood in a French door can warp due to temperature changes and humidity. Usually, the warping is not enough to cause a noticeable issue. However, enough of a change in conditions can cause the latch to become misaligned, similar to the misalignment caused by loose hinges. Fixing a warped door is much more difficult. Due to the nature of how wood warps, each warped door is a unique case, so there is no method that works in all situations. The warping and method of repair need to be properly assessed, usually by a professional, to determine how to fix the door so the latch is properly aligned.