S pen settings desperate

Is there a configuration for s pen that only write when the spen touch the screen I fell very desperate because a distance of a inch detect the spen and cause that can't write well Thanks