Your pattern means: a dot (\\.) followed by 24 symbols. So this matches: ".objective is of the stu".
If you want to detect, say 10 dot symbols, use a pattern like this: dot_pat="\.{10}"
str_detect("The primary.objective is of the study.", "\\.{10}")
str_detect("hello..........world", "\\.{10}")