Hi Rahul, Welcome to the Atlassian Community!
If your Bamboo agent(s) has a GUI it should be possible to run non headless tests. Bamboo agents simply execute the commands you define in the build scripts. So the agent must support the commands you specify.
Here is someone who solved it by using the --no-sandbox option for Chrome: https://community.atlassian.com/t5/Bamboo-questions/How-to-call-chrome-by-bamboo-with-selenium-web-driver/qaq-p/1190182#M27186 Perhaps that will solve your issue.
When searching the web about this issue I found a lot of results, everything depends on your OS, programming language and other technologies you're using of course.