Classic problem:
When you are doing the actions manually, including while you are recording, you are taking cues from what you see on screen to know when it is "legal" for you to click on that OK button. You wait for the modal form to appear, for the button to become enabled, etc. So, manually, everything works fine and records fine.
HOWEVER... TestComplete isn't quite that "smart". When you playback what you record, TestComplete attempts to execute things as FAST as possible... this means that it doesn't always wait a sufficient amount of time for the object to be available for interaction. So, it attempts to act before the application is ready for it.
With Web Applications, sometimes buttons are present ("Exist") but are not visible and so TestComplete sometimes "clicks" on such things even though they aren't really there... so you get what APPEARS to be a successful test but it really isn't.
So... you need to "wait" for the object to be available. This is code/commands you have to manually add in after the recording to instruct TestComplete to delay. There are several ways of doing so... the easiest and most blunt is to simply add a "Delay" action before the button click. But I wouldn't recommend this because sometimes the object is available sooner than others.
I would recommend adding a "WaitProperty" action on your OK button prior to attempting to click it. In that WaitProperty, have it wait for "VisibleOnScreen" to be true that should "fix" your problem.
For more information, check out https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html