Hide a Fluid app toolbar using applescript
It the target app does not have focus then there is no menu item to click of its process.

Add tell application "Test App" to activate before trying to click a menu item.

tell application "Test App" to activate
tell application "System Events"
    tell process "Test App"
        if menu item "Hide Status Bar" of menu "View" of menu bar 1 exists then
            click menu item "Hide Status Bar" of menu "View" of menu bar 1
        end if
        if menu item "Hide Bookmark Bar" of menu "View" of menu bar 1 exists then
            click menu item "Hide Bookmark Bar" of menu "View" of menu bar 1
        end if
        if menu item "Hide Tab Bar" of menu "View" of menu bar 1 exists then
            click menu item "Hide Tab Bar" of menu "View" of menu bar 1
        end if
        if menu item "Hide Toolbar" of menu "View" of menu bar 1 exists then
            click menu item "Hide Toolbar" of menu "View" of menu bar 1
        end if
    end tell
end tell


Also note if there are any timing issues you may have to add a delay command after the activate command, e.g.: delay 1