This is a question that a great many critical scholars have set out to answer, bearing in mind that, like all four New Testament Gospels, Acts was originally anonymous and the book makes no claim to authorship by a companion of Paul, other than in the occasional use of the first person in the narrative. As you suggest, this could have been a fictive device to give a sense of closeness to the action or to imply that the author was present at the events portrayed. A snapshot of scholarly views on the authorship of Acts provides compelling evidence that the author was not a companion of Paul the apostle.
John Shelby Spong speaks for a majority of critical scholars when he says, in Born of a Woman, page 109,that Acts was not written until at least 90-95 CE, which would be much too late for the author to have been a companion of Paul. He also says the author of Acts would not have been Paul’s travelling companion because of the large number of discrepancies between Acts and Paul’s epistles. Raymond E. Brown, one of the most respected New Testament scholars and theologians from the twentieth century, agrees in An Introduction to the New Testament, pages 267-8, going on to say (page 269) that the Gospel is inaccurate on Palestinian geography (*), calling into question whether the author could have been the "we" companion who seemingly spent two or three years there. Further, Brown draws attention to quite a few passages that appear to have been inspired from other sources. On page 292, he points out that Gamaliel supposedly mentions Theudas' revolt years before the revolt actually occurred, a mistake that has been explained by the author's use of Josephus' account as his source.
Uta Ranke-Heinemann says in Putting Away Childish Things, page 167, Acts of the Apostles is in its entirety a work of propaganda aimed at Gentile Christians and Gentiles who have not yet become Christians. She provides evidence against the inerrancy of *Acts *, such as that the stories of the conversion on the road to Damascus and Paul's miraculous escape from prison appear strongly to be based on the ancient play, the Bacchae. On page 171, she also cites Joachim Schoeps (Das Judenchristentum, p10), who says anyone used to evaluating texts critically has no choice but to rate it as a document of the second or even third Christian generation - in other words, far removed from the apostles.
Steve Mason discusses parallels between Acts and the works of the Jewish historian Josephus, in Josephus and the New Testament chapter 6. He says Luke’s prefaces are very similar to Josephus’ particular style, particularly in Acts which looks back to the first book, much as Jewish Antiquities does. 'Luke' dedicates the Gospel and Acts to Theophilus, a common name that means Friend of God. Josephus dedicates Jewish Antiquities, but not Jewish Wars, to Epaphroditus, a common name that means 'Touched by Aphrodite'. This is a strong coincidence that cannot be explained by common source material. Either Josephus copied the style and patronage from Luke, or Luke’s Gospel was written later than 94 CE. He goes on, to discuss material that many believe that 'Luke' copies from Josephus. This all points to a creative account which was in no way based on personal experience.
Footnote:
This site also says: " Nothing can be said with certainty about the author of Luke — except that he had little knowledge of Palestine."
One such geographical error is in Luke 8:26:
Then they sailed to the territory of the Gerasenes, which is opposite Galilee.
Gerasa is 30 miles to the south-east of the lake and inconsistent with the having sailed there or of the pigs rushing to their deaths in the lake. It was the author of Mark's Gospel who introduced this error, but the author of Luke copied this verbatim, unaware of the error. The author of Matthew, more aware of Palestinian geography, altered this to the more plausible 'Gadarenes'.