How to handle issue of where intermittently click or tap doesn't work?

How to overcome issue of where intermittently click or tap doesn’t work?

size = driver.manage().window().getSize();
int y=size.height/2;
int x=size.width/2;

    Reporter.log("---Tap screen to bring up pause button.", true);
    //driver.tap(1, x, y, 500); (sometimes failing with this so tried to change to TouchAction
    TouchAction touchAction = new TouchAction(driver);
    touchAction.tap(x, y).perform();

Wait for pause button to appear, if not perform the touch again.

Thanks for answering. If I have it tap again isn’t that forcing the test to work? It may mask a bug where tapping one time doesn’t bring up the pause button when it should.

What if I have the already used wait.until(ExpectedConditions.elementToBeClickable(By.id(“pause”))
but it still doesn’t open up the pause button with a tap or click all the time?

Intermittently the tap or click doesn’t get processed. What are some things I can do to fix this?