ModalResult never returns mrOk after ShowModal

Hello team!
I want to use the results of a form after a ShowModal, but ModalResult never returns true.
for example if I write this code
F:=TFormX.CreateNew();
F.Popup:=True;
F.PopupOpacity:=0.2;
if F.ShowModal()=mrOk then
showmessage('yes');

the message will never be displayed.
and if I write :
F.Popup:=True;
F.PopupOpacity:=0.2;
F.ShowModal();
showmessage('yes');

then showmodal and showmessage are executed at the same time